moroshko / react-autowhatever

Accessible rendering layer for Autosuggest and Autocomplete components

Home Page:http://react-autowhatever.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onChange issue with custom input

tdhung80 opened this issue · comments

Hi,

In case of custom input, when i clicked on a Suggestion, it would trigger a Change event by MouseEvent, onChange is invoked but the event target is not the input, that would cause a problem if there is a custom code in onChange of the input.

`
key: 'maybeCallOnChange',

value: function maybeCallOnChange(event, newValue, method) {

  ...
  ...

  if (newValue !== value) {
    onChange(event, { newValue: newValue, method: method });
  }

}

`

My Bests,
Hung Tran