Animate on scroll react not working


Topic: Animate on scroll react not working

Adam Satvilker asked 4 years ago

Expected behavior When adding ‘reveal’ prop, animations will run only once component is visible in viewport.

Actual behavior Not the case, they do work so is NOT an issue of reduced mobility in accessibility settings which i can confirm is off. Problem is they all run when the browser loads, regardless of if they are in the viewport or not. Is there a way to fix this? Thank you


Piotr Glejzer staff commented 4 years ago

did you try to use prop onAnimationStart?


Adam Satvilker commented 4 years ago

No, sorry how would this help? I thought this just triggers a function?


Piotr Glejzer staff commented 4 years ago

Maybe try to if the element is visible in the viewport set this prop to true else?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.27.0
  • Device: Macbook pro
  • Browser: Chrome, Safari
  • OS: Mac OS
  • Provided sample code: No
  • Provided link: No