react-autocomplete-input icon indicating copy to clipboard operation
react-autocomplete-input copied to clipboard

add onChangeAdapter prop

Open daniele-bottelli opened this issue 2 years ago • 1 comments

daniele-bottelli avatar May 27 '22 13:05 daniele-bottelli

I'm using a 3rd party component that is firing onChange using the new value as parameter ( not the complete event ), so I need the adapter

daniele-bottelli avatar May 27 '22 14:05 daniele-bottelli

Too narrow to merge, sorry. You can introduce a wrapper component instead in your code and do the same thing. Something like that should do the trick

const AutoCompleteInputWrapper = ({ onChangeAdapter, ...rest }) = <ReactAutocompleteInput onChange={onChangeAdapter} {...rest} />;

yury-dymov avatar Jan 19 '23 01:01 yury-dymov