Documentation / @zerotal/admin / index / applyLayout
Function: applyLayout()
applyLayout<
T>(widgets,keyOf,layout):object
Defined in: admin/src/dashboardLayout.ts:53
Apply a layout to the widgets a panel declares.
The declaration is the source of truth for which widgets exist; the layout only says how to arrange them. So a widget added since the layout was saved still appears (at the end, where it is noticeable rather than lost), and a widget since removed does not resurrect because a stale key mentions it.
Type Parameters
T
T
Parameters
widgets
T[]
keyOf
(widget, index) => string
layout
DashboardLayout | null
Returns
object
visible
visible:
T[]
hidden
hidden:
object[]