fix: assign field modal cantnot open (#2807)

This commit is contained in:
katherinehhh 2023-10-12 16:45:17 +08:00 committed by GitHub
parent 89361ef61c
commit a3de91b37f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -557,6 +557,7 @@ function AssignedFieldValues() {
<DefaultValueProvider isAllowToSetDefaultValue={() => false}>
<SchemaSettings.ActionModalItem
title={t('Assign field values')}
maskClosable={false}
initialSchema={initialSchema}
initialValues={fieldSchema?.['x-action-settings']?.assignedValues}
modalTip={tips[actionType]}

View File

@ -871,13 +871,10 @@ SchemaSettings.ActionModalItem = React.memo((props: any) => {
await api.resource('uiSchemas').insert({ values: initialSchema });
setSchemaUid(initialSchema['x-uid']);
}
ctx.setVisible(false);
setVisible(true);
}, [api, ctx, dn, fieldSchema, initialSchema, schemaUid]);
const onKeyDown = useCallback((e: React.KeyboardEvent<HTMLLIElement>): void => e.stopPropagation(), []);
return (
<>
<SchemaSettings.Item {...others} onClick={openAssignedFieldValueHandler} onKeyDown={onKeyDown}>