Skip to main content

useManagerWidgetStates

Interfaces

UseManagerWidgetStatesOutput

Properties

PropertyTypeDescriptionDefined in
managerWidgetStatesIdMap<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
setManagerWidgetStatesDispatch<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

ParameterTypeDescription
initialWidgetSettingsIdMap<WidgetSetting>The initial collection of per-widget settings.

Returns

UseManagerWidgetStatesOutput

Defined in

manager/hooks/useManagerWidgetStates.ts:26