feat(blocksAntd): update TextInput to work with validation

This commit is contained in:
Gervwyk 2020-11-16 15:37:43 +02:00
parent 2441e03f7b
commit faa194a9c6
4 changed files with 1860 additions and 43 deletions

View File

@ -38,6 +38,10 @@
type: TextInput
properties:
size: large
- id: 'properties.size: small'
type: TextInput
properties:
size: small
- id: 'properties.suffix: Suffix to the text'
type: TextInput
properties:

View File

@ -21,7 +21,7 @@ import { blockDefaultProps } from '@lowdefy/block-tools';
import Label from '../Label/Label';
import Icon from '../Icon/Icon';
const TextInput = ({ blockId, loading, methods, properties, required, validate, value }) => {
const TextInput = ({ blockId, loading, methods, properties, required, validation, value }) => {
return (
<Label
blockId={blockId}
@ -29,7 +29,7 @@ const TextInput = ({ blockId, loading, methods, properties, required, validate,
methods={methods}
properties={{ title: properties.title, size: properties.size, ...properties.label }}
required={required}
validate={validate}
validation={validation}
content={{
content: () => {
return (

View File

@ -2,6 +2,10 @@
"valueType": "string",
"category": "input",
"loading": false,
"test": {
"validation": true,
"required": true
},
"schema": {
"properties": {
"type": "object",

File diff suppressed because it is too large Load Diff