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

What is Framer? Join the Community
Return to index
Bhaskar Ravi
Posted Jul 21 - Read on Facebook

Does anyone know how to enable direction lock on a Flow Component? I have a nested page component within a flow comp that scrolls and it's causing issues.

Thanks

8 Comments

Andrew Nalband

Please attach your project and I'll help you out

Bhaskar Ravi

Thanks Andrew Nalband

https://framer.cloud/krUvl

Bhaskar Ravi

Obviously I can get it working by manually adding a scroll layer into the Flow Component - but would be great to get this working w/ the Flow Comps built in scroll property :)

Andrew Nalband

Bhaskar Ravi - thanks for sharing your project. I had to look in the docs for this one. It turns out the FlowComponent automatically generates a ScrollComponent in this situation, so you need to add this line:

searchContentController.scroll.speedY = 0

Here's your file with the line added: https://framer.cloud/SZzjc

Andrew Nalband

You could also get the same result with:

searchContentController.scroll.scrollVertical = false

Bhaskar Ravi

This simply disables scroll though. You can also pass a boolean through during the creation of the Flow Component to achieve the same thing. I'm wondering if there is a way to access direction lock with all this so that you don't get the wonky paging / scrolling issues

Bhaskar Ravi

But you did answer my question! Because with access to the scroll attribute this line should do the trick :)

searchContentController.scroll.directionLock = true

Thanks Andrew Nalband!

Andrew Nalband

Ah, now I see what you were trying to do. I'm glad we got there!

Read the entire post on Facebook