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

BaseDividedBox: with more than 2 children, setting the dividerFactory property will remove the third child #185

Open
joshtynjala opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@joshtynjala
Copy link
Member

From @MatseFR:

I found an issue with BaseDividedBox : if you have more than 2 items in the box and you set the dividerFactory property it will remove the third item.
This is because the code doesn't account for the previously removed divider(s) when calculating the next divider's child index. I only have 3 items but I guess more items will currently lead to strange results 🙂

For now I fixed it on my side with a small change to line 220 :

var layoutIndex = i * 2 - (i - 1);
@joshtynjala joshtynjala added the bug Something isn't working label Aug 12, 2024
@joshtynjala joshtynjala added this to the v1.4 milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant