FormSelect
Formik-connected dropdown for a list of options
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
FormSelect binds a dropdown to a Formik field. It stores the option's
valueField value and displays its labelField text.
<FormSelect
name="language"
context={FormikContext}
label="Language"
options={[
{ label: "English", value: "en_US" },
{ label: "Deutsch", value: "de_DE" },
]}
labelField="label"
valueField="value"
/>Use the onChange callback for app-specific side effects, while treating Formik as
the owner of the selected field value. The control supports the underlying dropdown
props except its data, change, blur, and placeholder props, which the helper manages.
Last updated on