Skip to content

charton API


charton API / @chart-on/ui / index / ToolbarItemWatch

Interface: ToolbarItemWatch ​

Defined in: ui/src/toolbar.ts:58

Keeps an item in step with changes made outside the toolbar.

Properties ​

watch? ​

optional watch?: (chart, refresh) => void | (() => void)

Defined in: ui/src/toolbar.ts:65

Subscribe to whatever changes the item's state and call refresh to re-read it (isActive, isDisabled, currentValue). Called when the item mounts and again when the chart the toolbar acts on changes (the active cell of a chart grid); return the unsubscribe function.

Parameters ​

chart ​

Chart

refresh ​

() => void

Returns ​

void | (() => void)