dnd-kit
dnd-kit copied to clipboard
scroll inside custom scroll container
We have custom scroll component, which listen mouse/touch events and manages scroll position programmatically. Scroll container has overflow set to hidden. autoScroll and restrictToFirstScrollableAncestor is not working in this case.
Workaround is listen to onDragMove, detect when dragged item reaches container boundary and afterwards set scroll according to delta.
Is it possible to simplify this?
It would be very convenient to make scroll management configurable. It should be possible with following changes:
- a way to exactly point to scroll container
- make isScrollable check configurable via callback
- provide callback for scroll events which should happens
Any updates?
I'll will try to implement this next month. @clauderic any thoughts, am i moving in a right direction?
also interested in this, is there an update?