Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Animate on scroll react not working

Adam Satvilker free 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 free 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

Opened

Specification of the issue

  • ForumUser: 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