This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Lukas Imrich
Posted Jun 04 - Read on Facebook

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

I thought this should work, but it didnt. Does someone has an idea what I am doing wrong here?



Fran Pérez

Interesting… it doesn't work when it's called from inside an event. This might be a bug.

Jordan Robert Dobson

Chris Camargo is this the same issue?

Chris Camargo

Is topBarButton2 part of your PageComponent, either as a subLayer or overlapping visually?

Fran Pérez

In the test I did yes, it was one page.

Chris Camargo

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.

Fran Pérez

Yep, that was the case :)

Lukas Imrich

Thank you guys!

Lukas Imrich

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.

Chris Camargo

Lukas, no bother at all. That's one thing I haven't attempted. May want to ask some of the others around here.

Read the entire post on Facebook