From bd573b6ee2961e345f07352ddbf6e7d9c4efed45 Mon Sep 17 00:00:00 2001 From: Katherine Date: Thu, 8 Aug 2024 15:20:07 +0800 Subject: [PATCH] fix: allowMultiple should not appear on read-only association fields (#5017) --- .../fields/component/Select/selectComponentFieldSettings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx b/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx index 2701d6762b..a346d6d293 100644 --- a/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx +++ b/packages/core/client/src/modules/fields/component/Select/selectComponentFieldSettings.tsx @@ -362,9 +362,10 @@ export const selectComponentFieldSettings = new SchemaSettings({ { ...allowMultiple, useVisible() { + const isFieldReadPretty = useIsFieldReadPretty(); const isAssociationField = useIsAssociationField(); const IsShowMultipleSwitch = useIsShowMultipleSwitch(); - return isAssociationField && IsShowMultipleSwitch(); + return !isFieldReadPretty && isAssociationField && IsShowMultipleSwitch(); }, }, {