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
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
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?