Skip to content

Column Type Boolean

export function formatBooleanValue(
value: unknown,
localeText: Pick<
BooleanColumnTypeLocaleText,
'yes' | 'no'
> = BOOLEAN_COLUMN_TYPE_LOCALE_TEXT,
): string;

export function createBooleanDropdownOptions(
localeText: BooleanColumnTypeLocaleText = BOOLEAN_COLUMN_TYPE_LOCALE_TEXT,
): DropdownOption<boolean | null>[];

export function createBooleanColumnType(
options: BooleanColumnTypeOptions = {},
): BooleanColumnType;

export type BooleanColumnValue = boolean | null | undefined;

interface BooleanColumnTypeLocaleText {
yes: string;
no: string;
notSet: string;
editorAriaLabel: string;
}

interface BooleanColumnTypeOptions {
localeText?: Partial<BooleanColumnTypeLocaleText>;
}

BOOLEAN_COLUMN_TYPE_LOCALE_TEXT: {
yes: string;
no: string;
notSet: string;
editorAriaLabel: string;
}

Dropdown editor adapter that presents every nullish boolean as Not set.

class BooleanDropdownEditor {}

Tri-state boolean column type backed by the Pro dropdown editor.

Values remain true, false, or null; locale text affects display only. Missing and null values render as empty cells while the editor exposes the localized Not set option.

class BooleanColumnType {}