You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PanelGroup can't provide a meaningful layout for Panels during the initial render because it doesn't yet know about their constraints. Panels register constraints with the parent PanelGroup on mount, which schedules an update so that PanelGroup can re-render them.
If a parent component uses Panel or PanelGroup imperative APIs on mount (before the scheduled update) the values returned won't be meaningful, and in some cases can even error.
I think the way to work around this is to move layout calculation from an effect to the registerPanel method and to eagerly calculate layouts once all panels have registered.
The text was updated successfully, but these errors were encountered:
Related to #211
PanelGroup
can't provide a meaningful layout forPanel
s during the initial render because it doesn't yet know about their constraints.Panel
s register constraints with the parentPanelGroup
on mount, which schedules an update so thatPanelGroup
can re-render them.If a parent component uses Panel or
PanelGroup
imperative APIs on mount (before the scheduled update) the values returned won't be meaningful, and in some cases can even error.I think the way to work around this is to move layout calculation from an effect to the
registerPanel
method and to eagerly calculate layouts once all panels have registered.The text was updated successfully, but these errors were encountered: