Skip to content

Latest commit

 

History

History
executable file
·
35 lines (19 loc) · 943 Bytes

select-field-usage.md

File metadata and controls

executable file
·
35 lines (19 loc) · 943 Bytes

Home / SelectField

SelectField

This widget is a form widget which allows the user select value(s) from a list of options using radio inputs.

SelectField is intrinsically a div element and accepts all its attributes.

Usage

import { SelectField } from "react-simple-widgets/dist/select-field";

<SelectField name label inline options onChange />;
  • name: string

    The key of the widget's value in the Formik provider

  • label?: string

    See FieldDecoration docs

  • inline?: boolean

    If set to true, the radio options will be rendered horizontally instead of vertically.

  • options?: Array<[any, any]>

    The list of options for the widget. Each option is a two-element array of [label, value].

  • onChange?: (value: any) => void

    If specified, this function is called with the selected value.