react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

fix autocomplete sets previous value using onInputChange

Open tdnl opened this issue 2 years ago • 1 comments

Problem

When providing onInputChange to an AutocompleteInput, a useEffect is run and resets the Textbox's value to the previous value.

As a result, users can not manually type a value when onInputChange provided.

Solution

It turns out the useEffect is not necessary if React-Admin's custom onInputChange properly sets the Textbox's state whenever it is called.

tdnl avatar Sep 05 '23 10:09 tdnl

@tdni any news on this one?

djhi avatar Dec 22 '23 08:12 djhi