dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

scroll inside custom scroll container

Open cherepanov opened this issue 3 years ago • 3 comments
trafficstars

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

cherepanov avatar Apr 25 '22 07:04 cherepanov

Any updates?

danylo-holovenko avatar Jun 22 '22 21:06 danylo-holovenko

I'll will try to implement this next month. @clauderic any thoughts, am i moving in a right direction?

cherepanov avatar Jun 23 '22 08:06 cherepanov

also interested in this, is there an update?

aaroniker avatar Jul 26 '22 11:07 aaroniker