shadcn-multi-select-component icon indicating copy to clipboard operation
shadcn-multi-select-component copied to clipboard

[Bug]: Scrolling does not work

Open ksamirdev opened this issue 1 year ago • 5 comments

If list is large, the scrolling does not work. I have to use scrollbar to scroll, natural scrolling with touchpad dont work

 <MultiSelect
              modalPopover
              options={new Array(100).fill(1).map((_, i) => ({
                label: i.toString(),
                value: i.toString(),
              }))}
              onValueChange={console.log}
/>

ksamirdev avatar Nov 28 '24 16:11 ksamirdev

This multiselect is inside Sheet component

ksamirdev avatar Nov 28 '24 16:11 ksamirdev

@gs03-dev - the gist is private, you need to make it public

cliffordfajardo avatar Dec 29 '24 01:12 cliffordfajardo

i had to add stoppropagation to the Popover component inside popover.tsx

<PopoverPrimitive.Content
  // NOTE: I had to add this, otherwise the scrolling wouldnt work:
  //  https://github.com/shadcn-ui/ui/issues/607
  onWheel={(e) => e.stopPropagation()}

cliffordfajardo avatar Dec 29 '24 01:12 cliffordfajardo

@cliffordfajardo - I updated the link. I will look more on your implementation

gs03-dev avatar Dec 29 '24 07:12 gs03-dev