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
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 useuseMeasure
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