Skip to content

Bitset field (number variant)

The bitset field is a variant of the number field

In the table page, a bitset number field will look like this

field image

In the create / edit page

edit field image

Config

Inside the number field config, you must pass the bitset config like this

{
type: 'number',
// ...
variant: {
type: 'bitset',
bitsetValues: {},
bitsetLabels: {},
}
}

bitsetValues

Values for the bitset

{ [K in string]: number }

bitsetLabels

Optionnal, labels for the bitset

{ [K in string]: string }