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

isActive is not delayed on load

Open JuicyRibs opened this issue 4 years ago • 2 comments

There's a delay after loading the page before isActive is loaded. I set the isActive with a state called isLoading which is default as true but the scroll is not locked when the page loads but it is locked after about 500ms. In this code, while Dimmer is already active, ScrollLock is not

      <ScrollLock isActive={props.isLoading} />
      <Dimmer active={props.isLoading}>
        <Loader>Loading</Loader>
      </Dimmer>```

JuicyRibs avatar Feb 05 '21 04:02 JuicyRibs

Can you provide a reproduction?

jossmac avatar Apr 22 '22 03:04 jossmac

They stopped the repairs. I had to do it myself, in the same way, with a new version of typeScript. And fix these problems for everyone to use. add react hooks、vue3 example

npm i body-scroll-lock-upgrade

repair log,Refer to the releases page.

rick-liruixin avatar Dec 01 '23 14:12 rick-liruixin