JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.57k stars 4.12k forks source link

Fix event handling with react-beautiful-dnd #5842

Open itsdouges opened 9 months ago

itsdouges commented 9 months ago

This pull request removes logic to bail out from an event if someone else listening to the event (usually in a capture phase) has called preventDefault(). This fixes interop between react-select and react-beautiful-dnd.

To ensure things don't regress, and to ensure to not contradict what was solved in https://github.com/JedWatson/react-select/pull/5134 I've added four e2e tests covering the various flows in both:

All tests pass, the same behaviour remains, hopefully we're good to go.

TODO

Closes https://github.com/JedWatson/react-select/issues/5833

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 16b4be76f8952cfbb4a4f6e6df715c28b751a325

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | react-select | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

itsdouges commented 9 months ago

cc @rkulinski @flexdinesh

codesandbox-ci[bot] commented 9 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 16b4be76f8952cfbb4a4f6e6df715c28b751a325:

Sandbox Source
react-codesandboxer-example Configuration