Home Reference Source
import TextArea from 'prg-form/src/TextArea.jsx'
public class | source

TextArea

Extends:

ComponentBaseInput → TextArea

TextArea input In Addition to {BaseInput} has theese props:

PropTypes

property type type signature description
name string required input name (you can use dots and array indexes)
placeholder string input placeholder
label string input label
type string "text" input type
className string input class
controlClass string surrounding paragraph class
defaultValue any is used, when input value is falsey
value any use, when input is operated outside <Form>
onChange function (value, input) => {} fired, when input is changed
onFocus function (input) => {} fired, when input is focused
onBlur function (input) => {} fired, when input is blured
disabled boolean disable input
readOnly boolean only read
required boolean input is required - HTML attribute
maxLength number maximal length
iconBefore any content shown before input
cols `number string` cols attribute of textarea
rows `number string` rows attribute of textarea

Example:

<TextArea
    name="inputName"
    cols={20}
    rows={5}
/>

Inherited Summary

From class BaseInput
public

getValue(): any

Returns input value

public

resetValue(value: *)

Reset and clean the validation errors

public

setError(error: string)

Show error

public

setValue(value: any): any

Set new value to input