ChoiceFormatterThis is a React component
SourceThis is a React component
import { ChoiceFormatter } from "@prestojs/ui";
ChoiceFormatter(props)
Render the label for choice based on the provided value
This is the default formatter used when a field has choices defined.
Parameter | Type | Description | |
---|---|---|---|
props.blankLabel | ReactNode | What to render when | |
* | props.choices | [any, string][]|Map | The choices to render. This can be a |
props.invalidChoiceLabel | ReactNode | What to render if | |
* | props.value | T | The value to format |
props.warnOnInvalidChoice | boolean | If Defaults to |