MurhafSousli / ngx-scrollbar

Custom overlay-scrollbars with native scrolling mechanism
https://ngx-scrollbar.netlify.app/
MIT License
618 stars 99 forks source link

Ngx-scrollbar with Angular CDK Drag and Drop #500

Closed rahulkutah closed 1 year ago

rahulkutah commented 1 year ago

I am using ngx-scrollbar with angular material CDK Drag and Drop. I am using Drag and Drop for Y Axis. When i am dragging an item the scroll container does not scroll properly. It is only working properly with in the visible area. When I am trying to drag and drop an item from first position to last position at that point the scroll container not scrolling properly. but with default scrollbar it is working fine.

In the example when i am trying to drag Korean Category to bottom it is letting not me do it. It is only allowing me drop up to Mexican category only. I have to drop the category in that index. than scroll again to bottom again drag it to the last index

Please help me with this how i can make it work. please check this stackblitz link for the issue

https://stackblitz.com/edit/stackblitz-starters-n4mkn9?file=src%2Fmain.ts

MurhafSousli commented 1 year ago

All you have to do is to use the scrollViewport directive on the scrollable element, here is a fixed stackblitz