Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 895 Bytes

TextArea.md

File metadata and controls

31 lines (23 loc) · 895 Bytes

TextArea

User-interactive component.

TextArea should be wrapped into FormGroup

Public interface

Props

TextArea contains html <textarea /> element. All props for <textarea /> are valid for TextArea.

Own props:

  • errorClassName - class that applies when model attribute is invalid. By default - has-error.
  • focusClassName - class that applies when user-interactive element have focus. By default - has-focus.
  • valueClassName - class that applies when model attribute have value. By default - has-value.
  • nativeRef - callback for React ref. Optional

Example

<Form 
    onSubmit={async (values) => await someRequest(values)}
    validator={new SchemaValidator(ExampleSchema)}
    errorParser={(error) => myCustomParser(error)}
>
    <FormGroup attribute="surname" validateOn="blur">
        <TextArea />
    </FormGroup>
</Form>