From 812a2cb24a1fd48b4de87de735949c2a54a5225e Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 5 Nov 2024 10:10:13 +0800 Subject: [PATCH] fix: filter issue when setting single-select field as title field in association select (#5581) --- .../src/schema-component/antd/remote-select/RemoteSelect.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx b/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx index baacd15c7c..86f521c188 100644 --- a/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx +++ b/packages/core/client/src/schema-component/antd/remote-select/RemoteSelect.tsx @@ -82,7 +82,8 @@ const InternalRemoteSelect = connect( const operator = useMemo(() => { if (targetField?.interface) { - return getInterface(targetField.interface)?.filterable?.operators[0].value || '$includes'; + const initialOperator = getInterface(targetField.interface)?.filterable?.operators[0].value || '$includes'; + return initialOperator !== '$eq' ? initialOperator : '$includes'; } return '$includes'; }, [targetField]);