IntroductionInstallationFormSimple FormButtonFieldFieldWrapperRadioGroupSelectBasic UsagePropsForm ValidationStateonFocus onChange onBlurState ManipulationCustom Error MessagesFeedback on disabled ButtonStylingDynamic FieldsDynamic Fields 2Dynamic Fields 3Bind Input FieldsBind Input Fields 2Third Party ComponentsFile UploadWhy
Select
This component has to be a child within the <Form />
component. This component must have <option />
components with an value prop as children.
Basic Usage
import {Form,Select,} from 'react-form-package';
Render a <Form />
with a <Select />
and a <Button />
component.
Props
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | String | true | ||
type | String | true | select | |
required | Bool | false | false | |
preOnChange | Func | false | manipulate the state before its validated (see State Manipulation) | |
errorMessage | String | false | define your own custom error message for the input | |
onFocus | Func | false | get access to the state of the form when the user focus on the input | |
onChange | Func | false | get access to the state of the form when the user changes the input | |
onBlur | Func | false | get access to the state of the form when the user blurs the input | |
bintTo | String, Array | false | only needed for binding input fields. The id/ids of the input/inputs you want to manipulate | |
bintToAllways | Bool | false | only needed for binding input fields. Only needed if you want that the bindToCallback is triggered even the bound input field was already touched (blurred) | |
bindToCallback | Func | false | only needed for binding input fields. The callback to set the target's (bindTo ) input value, which gets called onChange (return a single value or an array of values) |