diff --git a/client/packages/design/components/WebMetaForm/types/Checkbox.tsx b/client/packages/design/components/WebMetaForm/types/Checkbox.tsx index ba7501f3..1fe4470a 100644 --- a/client/packages/design/components/WebMetaForm/types/Checkbox.tsx +++ b/client/packages/design/components/WebMetaForm/types/Checkbox.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { Form, Checkbox } from 'antd'; import type { FastifyFormFieldComponent } from 'react-fastify-form'; import { getValidateStatus } from '../utils'; diff --git a/client/packages/design/components/WebMetaForm/types/Password.tsx b/client/packages/design/components/WebMetaForm/types/Password.tsx index a169a69a..a8a230e5 100644 --- a/client/packages/design/components/WebMetaForm/types/Password.tsx +++ b/client/packages/design/components/WebMetaForm/types/Password.tsx @@ -5,8 +5,16 @@ import { getValidateStatus } from '../utils'; export const FastifyFormPassword: FastifyFormFieldComponent = React.memo( (props) => { - const { name, label, value, onChange, error, maxLength, placeholder } = - props; + const { + name, + label, + value, + onChange, + onBlur, + error, + maxLength, + placeholder, + } = props; return ( onChange(e.target.value)} + onBlur={onBlur} /> ); diff --git a/client/packages/design/components/WebMetaForm/types/Select.tsx b/client/packages/design/components/WebMetaForm/types/Select.tsx index bed1961c..19bafb29 100644 --- a/client/packages/design/components/WebMetaForm/types/Select.tsx +++ b/client/packages/design/components/WebMetaForm/types/Select.tsx @@ -14,7 +14,7 @@ interface FastifyFormSelectOptionsItem { export const FastifyFormSelect: FastifyFormFieldComponent<{ options: FastifyFormSelectOptionsItem[]; }> = React.memo((props) => { - const { name, label, value, onChange, options } = props; + const { name, label, value, onChange, onBlur, options } = props; useEffect(() => { if (_isNil(value) || value === '') { @@ -25,7 +25,12 @@ export const FastifyFormSelect: FastifyFormFieldComponent<{ return ( - onChange(value)} + onBlur={onBlur} + > {options.map((option, i) => (