Dear Framer community,
I am scratching my head over this little thing. I am working with page component and I would like to switch to the next page after a click event, like:
topBarButton2.on Events.Click, -> page.snapToNextPage()
I thought this should work, but it didnt. Does someone has an idea what I am doing wrong here?
Interesting… it doesn't work when it's called from inside an event. This might be a bug.
Chris Camargo is this the same issue?
Is topBarButton2 part of your PageComponent, either as a subLayer or overlapping visually?
In the test I did yes, it was one page.
So, if you're clicking a page, the PageComponent is firing an internal snapToPage() on dragEnd and you're likely competing with it. Try wrapping YOUR snapToPage() in a Utils.delay 0, -> and see if that works.
Yep, that was the case :)
Thank you guys!
Chris, by any chance, do you have an idea how to disable drag events on the page component? Basically I would like to use the page component as a simple tab bar without moving between tabs as a result of swiping.
Sorry for bothering you, but I already spent hours of trying to do so, and still nothing works.
Lukas, no bother at all. That's one thing I haven't attempted. May want to ask some of the others around here.