ButtonControl

View as Markdown

A standard clickable button.

TypeScript
export interface ButtonControl<TData = any, CTX = ActionColumnContext<TData>> extends BaseControl<TData,
Extends

BaseControl<TData, CTX>

Properties

PropertyTypeDescription
busyLabelstringLabel shown while an async onClick is pending.
confirmConfirmConfig<CTX>Optional confirmation prompt shown before onClick runs.
onClick(context: CTX) => void | Promise<void>Handler invoked when the button is clicked. May return a Promise, in which
case the button shows a busy/pending state and is disabled until it resolves.
type'button'Discriminator. Set to 'button'.

Property Details

busyLabel

Label shown while an async onClick is pending.

TypeScript
busyLabel?: string;
Property Value

string

confirm

Optional confirmation prompt shown before onClick runs.

TypeScript
confirm?: ConfirmConfig<CTX>;
Property Value

ConfirmConfig<CTX>

onClick

Handler invoked when the button is clicked. May return a Promise, in which case the button shows a busy/pending state and is disabled until it resolves.

TypeScript
onClick: (context: CTX) => void | Promise<void>;
Property Value

(context: CTX) => void | Promise<void>

type

Discriminator. Set to 'button'.

TypeScript
type: 'button';
Property Value

'button'