Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reselect empty value AutocompleteInput #4435

Closed
kchupakhin opened this issue Feb 20, 2020 · 1 comment · Fixed by #5698
Closed

Reselect empty value AutocompleteInput #4435

kchupakhin opened this issue Feb 20, 2020 · 1 comment · Fixed by #5698
Labels

Comments

@kchupakhin
Copy link

kchupakhin commented Feb 20, 2020

Greetings all.
I faced with problem when try reselect empty value on Edit form in AutocompleteInput after input some value.

What you were expecting:
Empty option will be selected again and the inputted value is deleted

What happened instead:
Input contains inputted value.

Steps to reproduce:
It's easy to reproduce on RA Demo

  1. Select filter Product;
  2. Select input and select not empty option;
  3. Then select input again and select empty option; We can see empty input - correct;
  4. Then input 'wa' - we can see empty and other options. Select empty option - we still see what was input.

We got report from user. "Empty option has behavior like common option, it means if we select empty we expect to see empty, but we can see what was inputted".

If it's expected behaviour please close issue. But I agree with this report because when we select some option the input.value changes to the selected even if we are talking about empty value.

Perhaps this problem applies to react-final-form because there is no state update after selected again the empty value.

Environment

  • React-admin version: 3.0.3 (also tested on 3.2.2)
@djhi
Copy link
Collaborator

djhi commented Feb 20, 2020

Reproduced. Thanks for the report. The entered value currently disappear on blur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants