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

AutocompleteArrayInput should be debounced #5904

Closed
ValentinH opened this issue Feb 12, 2021 · 3 comments
Closed

AutocompleteArrayInput should be debounced #5904

ValentinH opened this issue Feb 12, 2021 · 3 comments
Labels

Comments

@ValentinH
Copy link
Contributor

What you were expecting:
If I type quickly 'test' in an AutocompleteArrayInput, only one request to the backend should be made with q=test.

What happened instead:
4 requests are sent, i.e. one per keystroke.
image

Steps to reproduce:

Observe the console and see that many requests are sent.

Other information:
A good practice for this kind of type-ahead input is too debounce the queries to avoid spamming the backend api.

Environment

  • React-admin version: 3.12.2
  • React version: 17.0.1
  • Browser: Brave
@fzaninotto fzaninotto added the bug label Feb 15, 2021
@fzaninotto
Copy link
Member

Thanks for the report

@fzaninotto
Copy link
Member

Fixed by #6003

@miguelVoper
Copy link

so how i put the prop in the autocompleteinput?

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

No branches or pull requests

3 participants