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

What is Framer? Join the Community
Return to index
Giovanni Caruso
Posted Jul 18 - Read on Facebook

Hi! I've spent a couple of hours prototyping a comment drawer (vertical list of accordion inside a scroll component) for a desktop app. Everything works like expected except for the fact that expanding one of the item, the scroll component doesn't update itself (?) and it is impossible to scroll all the way down to the end of the list. Here an example ( quick edit of Josh Puckett accordions list ). Any hint?


Kim Does

You can use this for that, it recalculated the height of the content in the scroll view to make sure it works correctly.


Re-calculates and updates the size of the content and the dragging constraints. It also accounts for the contentInset.

If you're looking to change the size of your content layers, you can call it to update the size of your ScrollComponent accordingly.


Giovanni Caruso

No luck with scroll.updateContent().

Kim Does

Scroll should be the name of your Scroll Component layer, so whatever you named it when you created it.

I didn't look at your prototype bc I'm on my phone.

Blaine Billingsley

You gotta either wait for the height animation to end before calling updatecontent or updateContent as it changes. I went with the latter in this example:

Giovanni Caruso

Thanks Blaine!!! Worked like a charm. Totally missed the .on"change:height" part (no sign in the documentation so I thought it was not necessary. Shame on me! )

Read the entire post on Facebook