mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-04 04:30:06 +00:00
fix: multi select scroll (#43)
This commit is contained in:
@@ -212,6 +212,14 @@ export const MultiSelect = React.forwardRef<
|
||||
}
|
||||
};
|
||||
|
||||
const stopWheelEventPropagation: React.WheelEventHandler = (e) => {
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
const stopTouchMoveEventPropagation: React.TouchEventHandler = (e) => {
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
return (
|
||||
<Popover
|
||||
open={isPopoverOpen}
|
||||
@@ -306,6 +314,8 @@ export const MultiSelect = React.forwardRef<
|
||||
className="w-auto p-0"
|
||||
align="start"
|
||||
onEscapeKeyDown={() => setIsPopoverOpen(false)}
|
||||
onWheel={stopWheelEventPropagation}
|
||||
onTouchMove={stopTouchMoveEventPropagation}
|
||||
>
|
||||
<Command>
|
||||
<CommandInput
|
||||
|
||||
Reference in New Issue
Block a user