This PR makes the following changes to the event-handling interfaces of TextInput and Datalist:
TextInput now has a single onInput prop in place of the previous onInputChange and onDOMChange props. Those props were only ever being called one after another as a result of a change event on the input element, so this simplifies the interface and changes the name to be more meaningful and correct.
Datalist now has an onInput prop that replaces the previous onInputChange prop. The latter was a confusing name in relation to the semantics of that prop, which was and is that it is triggered as a result of the child TextInput's onInput event.
Besides updating the usage of these components and fixing up some stale comments, this also makes a change to the shouldComponentUpdate method of Dialog. On master, it never re-renders while the dialog is open, which means that the contents of the dialog don't ever re-render as a result of a parent re-render. Consequently, the Select component of Datalist was not correctly filtering during input. This changes the shouldComponentUpdate method to always re-render when the Dialog is open.
Unassigning @DivyaPrabhakar since she's busy at the moment and anybody else can review this. Of course, if @DivyaPrabhakar frees up, she can still do the review!
This PR makes the following changes to the event-handling interfaces of
TextInput
andDatalist
:TextInput
now has a singleonInput
prop in place of the previousonInputChange
andonDOMChange
props. Those props were only ever being called one after another as a result of achange
event on theinput
element, so this simplifies the interface and changes the name to be more meaningful and correct.Datalist
now has anonInput
prop that replaces the previousonInputChange
prop. The latter was a confusing name in relation to the semantics of that prop, which was and is that it is triggered as a result of the childTextInput
'sonInput
event.Besides updating the usage of these components and fixing up some stale comments, this also makes a change to the
shouldComponentUpdate
method ofDialog
. On master, it never re-renders while the dialog is open, which means that the contents of the dialog don't ever re-render as a result of a parent re-render. Consequently, theSelect
component ofDatalist
was not correctly filtering during input. This changes theshouldComponentUpdate
method to always re-render when theDialog
is open.Addresses #3713.