Skip to content

Commit

Permalink
feat: fix validateTrigger setting onBlur inoperative
Browse files Browse the repository at this point in the history
  • Loading branch information
lhbxs committed Mar 23, 2024
1 parent e29696c commit e7f1f3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/form-render/src/render-core/FieldItem/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export default (props: any) => {
const initialValue = schema.default ?? schema.defaultValue;
const classRest = { 'fr-hide-label': label === 'fr-hide-label', 'fr-inline-field': inlineSelf, 'fr-field-visibility': !visible, [schema.className] : !! schema.className };

debugger;
const formItem = (
<Form.Item
className={classnames('fr-field', classRest)}
Expand All @@ -190,7 +191,7 @@ export default (props: any) => {
wrapperCol={fieldCol}
noStyle={noStyle}
dependencies={dependencies}
validateTrigger={ validateTrigger ?? fieldRef?.current?.validator ? 'onSubmit' : 'onChange' }
validateTrigger={ validateTrigger ?? (fieldRef?.current?.validator ? 'onSubmit' : 'onChange') }
>
{fieldProps.onStatusChange ? (
<FieldWrapperStatus
Expand Down

0 comments on commit e7f1f3b

Please sign in to comment.