Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / BusyChangedEvent

Interface: BusyChangedEvent

Defined in: datagrid-core/dist/index.d.ts:3141

Long-running work started or finished.

progress is 0–100 ONLY where a real measure exists (columns encoded, rows exported, blocks fetched). Everywhere else it is null and the UI shows an indeterminate spinner — a percentage invented from a timer tells the user something the grid does not know.

Properties

background?

optional background?: boolean

Defined in: datagrid-core/dist/index.d.ts:3171

True when every pass currently running was started by the grid itself — a streamed transaction batch, a scroll-driven remote block fetch — rather than by something the user asked for and is waiting on.

Exists for the loading overlay. Live updates with an active sort re-run the pipeline on every batch; each pass cleared the overlay's delay and the indicator strobed until the grid was unusable. Scrolling a remote grid did the same through block fetches. Neither is a wait the user chose, so the overlay ignores background passes entirely; programmatic listeners still see every event.


busy

busy: boolean

Defined in: datagrid-core/dist/index.d.ts:3142


cancellable?

optional cancellable?: boolean

Defined in: datagrid-core/dist/index.d.ts:3158

Whether cancel() can still stop THIS pass — so a UI can offer the button only when pressing it would do something.

Phase alone cannot answer that. An Excel export is cancellable while rows are being fetched and written, and stops being cancellable the moment the workbook is handed to the writer: serialising and zipping is one uninterruptible call that measured 93 % of a large export's total time. A Cancel button left on screen through that is a button that does nothing.

Optional so an emitter that predates it still type-checks; treat a missing value as "unknown", not as "no".


phase

phase: BusyPhase | null

Defined in: datagrid-core/dist/index.d.ts:3144


progress

progress: number | null

Defined in: datagrid-core/dist/index.d.ts:3143