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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| themeOverride | Object | null | A partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants. | |
| value | string|boolean|number | undefined | The value to present. null, undefined, and "" render the dash. | |
| trueLabel | string | "Yes" | Word shown for a true value. | |
| falseLabel | string | "No" | Word shown for a false value. | |
| inline | boolean | false | Renders without a wrapping element, for use inside an existing text row. | |
| class | import('vue').HTMLAttributes['class'] | undefined | Additional CSS classes applied to the root. |
Source
client/lib/display/boolean-display/BooleanDisplay.vue