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

Double submit with AutoSubmitFormController #444

Open
gap777 opened this issue Nov 20, 2024 · 0 comments
Open

Double submit with AutoSubmitFormController #444

gap777 opened this issue Nov 20, 2024 · 0 comments

Comments

@gap777
Copy link

gap777 commented Nov 20, 2024

We're using AutoSubmitFormController on a search input. However, if the user ends their search term entry with 'enter', the form submits twice:

  • once via normal form mechanics
  • once after the debounce interval of AutoSubmitFormController expires

Depending on user typing dynamics, this produces either:

  • 2 separate requests for the same resource
  • 1 canceled request, 1 fulfilled request

Furthermore, the 2 requests can interact in unexpected ways and we sometimes see results that conflict with the state of the input.

Is it possible for the form submission (via enter) to cancel any pending submission timers?

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

No branches or pull requests

1 participant