Is there a way to unobserve the component if it reaches a certain index? Example. If I have 10 elements and is Observing the scroll or mouse wheel for that element. Per scroll one element will animate. Then when it reaches the last element (10th element) it will stop observing it and will proceed with the normal scrolling. But if I scroll back to that Component (with observer previously attached) it will start Observing the element again and animate the element inside it again.
Just like in the sample codepen above. It scrolls like a carousel. But what I want is when it reaches the last element it will stop its observer so that I can continue with the normal scroll.
Is there a way to do that?