Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column/Row margins do not change when updated #2026

Open
dellisd opened this issue May 14, 2024 · 1 comment
Open

Column/Row margins do not change when updated #2026

dellisd opened this issue May 14, 2024 · 1 comment

Comments

@dellisd
Copy link
Collaborator

dellisd commented May 14, 2024

Column(margin = Margin(start = if (thisOrThat) 16.dp else 0.dp)) { }

In this example, if thisOrThat is some state that mutates, the margins of this column don't get updated. This is especially noticeable in lazy columns with view reuse enabled.

@colinrtwhite
Copy link
Collaborator

We recently added tests that reproduce this behaviour. Interestingly the Compose UI implementation behaves as expected.

I've confirmed the correct margin is being passed to the Yoga implementation and a new layout pass occurs so the issue must be deeper inside the Yoga implementation. Looking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants