created:7/7/2021
updated:7/7/2021
loc
8
comments
38%
failed
6
coverage
100%
SelectField
grommet-controls
3.0.2A Select field with form validation
Name | Description | Default | |
---|---|---|---|
IWithFormFieldProps(7 properties) | |||
validation | default validation rules ValidationType | ValidationType[] | - | |
name | field name string | - | |
label | field label ReactNode | - | |
description | field help/description string | - | |
controlLabel | if separate - label of the FormField ReactNode | - | |
inField | whether the field is in a FormField boolean | - | |
children | child component ((props: IFieldProps) => any) & ((...args: any[]) => any) | - | |
SelectProps(36 properties) |
<WithFormField>
WithFormField
from"../WithFormField"
<Select
options
/>grommet
^2.15.0- config
- source
() => (<FormonSubmit={() => console.log('onSubmit')}pad={{ horizontal: 'small' }}focusFirstChild={false}><SelectFieldlabel="Country"name="country"inField={false}options={['USA', 'England', 'France']}/><Box pad="small"><Button type="submit" label="Submit" /></Box></Form>)
- config
- source
() => (<FormonSubmit={() => console.log('onSubmit')}pad={{ horizontal: 'small' }}focusFirstChild={false}><SelectFieldlabel="Country"name="country"options={['USA', 'England', 'France']}validation={[validators.required()]}/><Box pad="small"><Button type="submit" label="Submit" /></Box></Form>)