StringSchemaInputcomponent
StringSchemaInput({ schema, value, onValue, ...props }: StringSchemaInputProps): ReactElement| Param | Type | |
|---|---|---|
props | StringSchemaInputProps | Props for StringSchemaInput, the StringSchema input variant. required |
| Return | |
|---|---|
ReactElement | A TextInput or TextareaInput element bound to the schema. |
Show a TextInput for a StringSchema, or a TextareaInput when the schema is multiline, sanitising and formatting values with the schema.
- Publishes the sanitized value through
onValue; the schema'sformat()only shapes what the input displays (on first render and on blur). - A
TextareaInputstarts at the schema'srows(2 by default for a multiline schema).
Examples
<StringSchemaInput name="email" schema={EMAIL} />