React-sortable-hoc: Scroll speed/accelaration using 'useWindowAsScrollContainer'

Created on 18 Jul 2019  路  3Comments  路  Source: clauderic/react-sortable-hoc

The scroll is very slow when using 'useWindowAsScrollContainer', how to control the speed/acceleration?

Most helpful comment

I think it's because of smooth scroll behavior. I worked around it in the AutoScroller class,
changing
this.container.scrollTop += offset.top
to
this.container.scrollBy({ top: offset.top, behavior: 'instant' })

All 3 comments

I think it's because of smooth scroll behavior. I worked around it in the AutoScroller class,
changing
this.container.scrollTop += offset.top
to
this.container.scrollBy({ top: offset.top, behavior: 'instant' })

@amaau Thank you for the work around, though its a bit slow when going up but its a lot better from the default behavior.

I just have the same problem using large data, and the react-infinity with react-sortable-hoc was the best solution for me because I had some issues with virtualization, here a link of an example with more of 3000 items, :point_right: https://codesandbox.io/s/exciting-snow-uehlk

Was this page helpful?
0 / 5 - 0 ratings

Related issues

silvenon picture silvenon  路  4Comments

ncammarata picture ncammarata  路  4Comments

suhaotian picture suhaotian  路  3Comments

sammiwei911 picture sammiwei911  路  3Comments

sami616 picture sami616  路  4Comments