[MultiSelect] stop propagation of onclose event when removing items#1949
[MultiSelect] stop propagation of onclose event when removing items#1949tyforcode wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the Bergside Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughMultiSelect's root element now explicitly stops ChangesEvent Propagation Control
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔗 Related issue (optional)
Closes #1948
📑 Description
When
MultiSelectis used inside of a Modal, the Modal'soncloseevent is incorrectly triggered when an item is removed fromMultiSelect. These items use the Badge component who's internal close() function bubbles up by default.This PR remediates this by stopping propagation of the
oncloseevent on the container of theMultiSelectcomponent🔍 PR Type
🚦 PR Status
✅ Checklist
pnpm lint && pnpm check && pnpm test:e2eand all tests passmainbranch (not the published npm version)🧪 Screenshots / Demos (optional)
ℹ️ Additional Information
Summary by CodeRabbit