mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-02-06 13:40:07 +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 (
|
return (
|
||||||
<Popover
|
<Popover
|
||||||
open={isPopoverOpen}
|
open={isPopoverOpen}
|
||||||
@@ -306,6 +314,8 @@ export const MultiSelect = React.forwardRef<
|
|||||||
className="w-auto p-0"
|
className="w-auto p-0"
|
||||||
align="start"
|
align="start"
|
||||||
onEscapeKeyDown={() => setIsPopoverOpen(false)}
|
onEscapeKeyDown={() => setIsPopoverOpen(false)}
|
||||||
|
onWheel={stopWheelEventPropagation}
|
||||||
|
onTouchMove={stopTouchMoveEventPropagation}
|
||||||
>
|
>
|
||||||
<Command>
|
<Command>
|
||||||
<CommandInput
|
<CommandInput
|
||||||
|
|||||||
Reference in New Issue
Block a user