created:7/7/2021
updated:7/7/2021
loc
229
comments
4%
passed
4
failed
6
coverage
10%
Form
grommet-controls
3.0.2A Form with built-in validation.
Name | Description | Default | |
|---|---|---|---|
IFormProps(10 properties) | |||
| a11yTitle | Custom title to be used by screen readers string | - | |
| focusFirstChild | Whether to focus the first form control on mounting boolean | true | |
| object | Initial values of the form data object object | {} | |
| onSubmit | A function called when the user successfully submits the form (data: object) => void | undefined | |
| onChange | A function invoked when any of the values in the form are changing (name: string, value: any, event: MouseEvent<HTMLElement, MouseEvent> & { value: any; }) => void | undefined | |
| onSubmitError | A function invoked when an error occured during submitting (errors: IFormErrors) => void | undefined | |
| onValidForm | A function invoked on every change when the form is valid (data: object) => void | undefined | |
| onInvalidForm | A function invoked on every change when the form is invalid (data: object) => void | undefined | |
| tag | The DOM tag to use for the form string & PolymorphicType | form | |
| className | css class name, assigned by styled-components string | - | |
BoxProps(26 properties) | |||
7 commits
package | imports | peer |
|---|---|---|
grommet ^2.15.0 | BoxPropsBox | * |
grommet/utils/object ^2.15.0 | deepMerge | * |
react ^17.0.1 | ReactComponent | * |
file | imports |
|---|---|
| "./StyledForm" | StyledForm |
| "../../utils/dom" | filterByFocusable |
| "./FormProps" | IFormPropsIFormContextIFormErrorsIFormFieldProps |