ChoiceSchemaInputcomponent

ChoiceSchemaInput({ schema, value, ...props }: ChoiceSchemaInputProps): ReactElement
ParamType
propsChoiceSchemaInputProps
Props for ChoiceSchemaInput, the ChoiceSchema input variant. required
Return
ReactElement
A ChoiceRadioInputs or SelectInput element bound to the schema.

Show a choice input for a ChoiceSchema — radio inputs for up to 8 options, otherwise a select.

  • The value is normalised through the schema's get(), so invalid or sentinel values (e.g. a CountrySchema's "detect") resolve to a real option or fall back to the placeholder rather than mis-selecting the first option.

Examples

<ChoiceSchemaInput name="role" schema={ROLE} />