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

SceneGridLayout: Fix issue with grid taking 0 height #693

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivanortegaalba
Copy link
Contributor

@ivanortegaalba ivanortegaalba commented Apr 15, 2024

Problem
Autosizer forces the consumer to have a parent with height or with flex layout.

This was causing the issue of having grid with height 0.

Approach
We can avoid that by not giving control to Autosizer and leaving the height to be the content.

We need the height from Autosizer to know the space available to fill all panels for the autofit feature. However, we don't need to let the component manage it, so we can use useMeasure to get the height.

This approach can be improved to do the measurement only if the autofit is enabled.

TODO
It gets into an infinite loop. In case someone have time to take a look, feel free to take it

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

Successfully merging this pull request may close these issues.

None yet

1 participant