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

onSelectedItemChange triggers multiple times when onMouseMove and onClick happens in the same frame #1597

Open
jeffijoe opened this issue Apr 26, 2024 · 0 comments

Comments

@jeffijoe
Copy link

jeffijoe commented Apr 26, 2024

  • downshift version: 9.0.4
  • node version: 20
  • npm (or yarn) version: 10.5.0

Relevant code or config

It's related to onSelectedItemChange

What you did: Use Playwright for testing a combobox.

What happened: The onSelectedItemChange is triggered twice.

Reproduction repository:

I based the reproduction on the official example for multi-selects.

https://github.com/jeffijoe/mobx-react-downshift-issue

Problem description: onSelectedItemChange triggers multiple times when onMouseMove and onClick happens in the same frame

Suggested solution: Prevent calling onSelectedItemChange twice in the same frame

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