useManagerWidgetStates
Interfaces
UseManagerWidgetStatesOutput
Properties
Property | Type | Description | Defined in |
---|---|---|---|
managerWidgetStates | IdMap <ManagerWidgetState > | The manager widget states. | manager/hooks/useManagerWidgetStates.ts:9 |
rescanAndRender | () => Promise <number > | Function that scans the widget base directory and renders newly added widgets. | manager/hooks/useManagerWidgetStates.ts:13 |
setManagerWidgetStates | Dispatch <SetStateAction <IdMap <ManagerWidgetState >>> | Setter for the manager widget states. | manager/hooks/useManagerWidgetStates.ts:11 |
Functions
default()
default(
initialWidgetSettings
):UseManagerWidgetStatesOutput
Hook for initializing the manager widget states.
This initializes the manager widget states with the initial widget settings, and prepares the setter and the UseManagerWidgetStatesOutput.rescanAndRender function that is the core function for refreshing the widget collection. This will also perform an initial scanning and render on mount with a small timeout.
Parameters
Parameter | Type | Description |
---|---|---|
initialWidgetSettings | IdMap <WidgetSetting > | The initial collection of per-widget settings. |