Boolean column type
BooleanColumnType
Section titled “BooleanColumnType”BooleanColumnType renders typed boolean values and edits them with the Pro dropdown editor. It keeps the stored value separate from its translated label:
truerenders as Yes.falserenders as No.nullandundefinedrender as an empty cell.- The editor offers Yes, No, and Not set; Not set saves
null.
import { createBooleanColumnType } from '@revolist/revogrid-pro';
grid.columnTypes = { boolean: createBooleanColumnType({ localeText: { yes: 'Oui', no: 'Non', notSet: 'Non défini', editorAriaLabel: 'Valeur booléenne', }, }),};
grid.columns = [ { prop: 'approved', name: 'Approved', columnType: 'boolean' },];new BooleanColumnType(options) and createBooleanColumnType(options) are equivalent. Locale overrides are optional and merge with the English defaults.
Locale text
Section titled “Locale text”interface BooleanColumnTypeLocaleText { yes: string; no: string; notSet: string; editorAriaLabel: string;}Translated labels affect rendering and editor options only. Source data remains true, false, or null.