Skip to content
EliteChart

AlertsDialogBinding

Documentation


Documentation / @elitechart/core / AlertsDialogBinding

Defined in: ui/alerts-dialog.ts:42

Wires the dialog to chart-side alert state. list() is called every time the dialog refreshes so updates flow through one source of truth.

Example

code
const binding: AlertsDialogBinding = {
  list: () => chart.listAlerts().map(toRow),
  onRemove: (id) => chart.removeAlert(id),
  onUpdate: (id, patch) => chart.updateAlert(id, patch),
};

Methods

list()

code
list(): readonly AlertsDialogRow[];

Defined in: ui/alerts-dialog.ts:44

Queried every render — returns the current alert list.

Returns

readonly AlertsDialogRow[]


onClose()?

code
optional onClose(): void;

Defined in: ui/alerts-dialog.ts:47

Returns

void


onRemove()

code
onRemove(id): void;

Defined in: ui/alerts-dialog.ts:45

Parameters

id

string

Returns

void


onUpdate()

code
onUpdate(id, patch): void;

Defined in: ui/alerts-dialog.ts:46

Parameters

id

string

patch
note?

string

price?

number

Returns

void