From baf611ea941cb1a5fdc0a2a9d57d5503191539fd Mon Sep 17 00:00:00 2001 From: UUBulb <35923940+uubulb@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:22:23 +0800 Subject: [PATCH] fix: multi select scroll (#43) --- src/components/xui/multi-select.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/xui/multi-select.tsx b/src/components/xui/multi-select.tsx index 285cff4..219e891 100644 --- a/src/components/xui/multi-select.tsx +++ b/src/components/xui/multi-select.tsx @@ -212,6 +212,14 @@ export const MultiSelect = React.forwardRef< } }; + const stopWheelEventPropagation: React.WheelEventHandler = (e) => { + e.stopPropagation(); + }; + + const stopTouchMoveEventPropagation: React.TouchEventHandler = (e) => { + e.stopPropagation(); + }; + return ( setIsPopoverOpen(false)} + onWheel={stopWheelEventPropagation} + onTouchMove={stopTouchMoveEventPropagation} >