Skip to content

BooleanDisplay ​

Overview ​

Presents a boolean as a word rather than its stored literal, so a read view says "Yes" instead of true. A null or absent value renders the same dash {@link DateTimeDisplay} uses for an empty date, which is the third state a NullBooleanField can hold.

A serializer that sends 1, 0, "true", or "false" still lands on a word; only null, undefined, and the empty string read as "no value recorded" and take the dash.

Theme entry: BooleanDisplay

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
valuestring|boolean|numberundefinedThe value to present. null, undefined, and "" render the dash.
trueLabelstring"Yes"Word shown for a true value.
falseLabelstring"No"Word shown for a false value.
inlinebooleanfalseRenders without a wrapping element, for use inside an existing text row.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes applied to the root.

Source ​

client/lib/display/boolean-display/BooleanDisplay.vue