mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
feat(blocksAntd): update TextInput to work with validation
This commit is contained in:
parent
2441e03f7b
commit
faa194a9c6
@ -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:
|
||||
|
@ -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 (
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user