Skip to content

Commit

Permalink
fix: select options on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
SySagar committed Feb 4, 2024
1 parent dec9be9 commit 845a738
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/fuselage/src/components/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ export const MultiSelect = forwardRef(
return show();
});

useEffect(() => {
const handleWheel = (e: any) => {
if (visible === AnimatedVisibility.VISIBLE) {
e.preventDefault();
}
};

document.addEventListener('wheel', handleWheel, { passive: false });

return () => {
document.removeEventListener('wheel', handleWheel);
};
}, [visible]);

return (
<Box
is='div'
Expand Down

0 comments on commit 845a738

Please sign in to comment.