react-scroll icon indicating copy to clipboard operation
react-scroll copied to clipboard

How to handle event before delay?

Open YuK1Game opened this issue 4 years ago • 1 comments

Hi.

I want to do a scroll action with a delay. and want execute an event just before the delay.

However, register('begin') is executed after delay.

Is there a way?

thanks.

YuK1Game avatar Mar 09 '20 07:03 YuK1Game

Hi

Have you tried adding an event to the Link/Trigger of the scroll?

i.e onClick={e => { /*execute event */ scroller.scrollTo("id", { delay : 200 }) }}

fisshy avatar Mar 09 '20 09:03 fisshy