Closed jbphet closed 2 years ago
@jbphet, I renamed things above. I didn't want to have the API be startChange
and onInput
, so it is startInput
, onInput
, and endInput
now. I tried to fix doc whenever I found it too. Please review and feel free to change doc to what makes sense to you.
Looks good, thanks for doing this. I also updated some of the documentation in NumberPicker
to be more consistent with this new set of names. Closing.
While working on https://github.com/phetsims/sun/issues/759, I noticed that the
onChange
listener inAccessibleValueHandler
handler is sometimes called when no change to the value occurs, such as when the value is clamped at a boundary. The documentation for this option currently looks like this:At first I thought this was a bug and proposed modifying the behavior to only invoke the function on an actual change of value, but when discussing it with @zepumph and @jessegreenberg, @zepumph said that he definitely has code that would break if we were to make this modification.
IMO, we should change this to something like
onInput
and modify the docs to be correct in order to make the API easier to use and to avoid problems in the future.