Correct sizing in hidden containers and tabs
A grid rendered while hidden (display:none tab, collapsed accordion) measures zero, which is a classic cause of broken columns. WarGrid detects visibility changes and re-measures automatically on reveal.
Planned. This page shows the specification from issue #205. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A WarUI tabs component whose second tab contains a grid with flex and auto-sized columns, created while hidden.
Expected behavior
With auto re-measure on, revealing the tab shows correctly sized columns immediately, and layoutready fires. With it off, the demo shows collapsed columns until refreshLayout() is clicked.
Planned API surface
ResizeObserver-based auto measurevisibilitychange handling (IntersectionObserver)refreshLayout() methodautoSizeColumns optionlayoutready eventAcceptance criteria
- A grid initialized at 0x0 defers column sizing until it has a non-zero size (pending)
- On becoming visible, the grid performs the column auto-size exactly once (pending)
- layoutready fires after the first non-zero layout (pending)
- Supports display:none, the hidden attribute, details/summary and content-visibility:auto (pending)
- No repeated measuring while the grid stays hidden (pending)