react-custom-scrollbars icon indicating copy to clipboard operation
react-custom-scrollbars copied to clipboard

There is no method for Scroll end

Open takshch opened this issue 4 years ago • 1 comments

There is no method for Scroll End. A function which will be called when scroll thumb is at end of track. I need to add infinity scroll feature. Tell me the solution if available.

takshch avatar Jun 14 '20 18:06 takshch

Pass a callback to "onScrollFrame", it will give you the current position. Lsten for the values.top to figure out if the current scroll hit the end.

values.top: (Number) scrollTop progress, from 0 to 1

onScrollFrame: (Function) Runs inside the animation frame. Signature: onScroll(values) values: (Object) Values about the current position values.top: (Number) scrollTop progess, from 0 to 1 values.left: (Number) scrollLeft progess, from 0 to 1 values.clientWidth: (Number) Width of the view values.clientHeight: (Number) Height of the view values.scrollWidth: (Number) Native scrollWidth values.scrollHeight: (Number) Native scrollHeight values.scrollLeft: (Number) Native scrollLeft values.scrollTop: (Number) Native scrollTop

itshallrun avatar Jun 27 '20 21:06 itshallrun