vue-scrollmonitor
vue-scrollmonitor copied to clipboard
State changed event is not triggered on scroll-item
@change="onUpdate"
Is not called on the scroll-item, only on the container.
I ended up not using this feature.
This may be the reason why isinviewport classes weren't showing.
I used the following to update the component, this also lead to the state classes to appear.
:class="`${scrollState[i] && scrollState[i].isInViewport}`"
(scrollState is a data attribute updated by @change on the scroll-container)
PR #3 might have something to do with it..