From 3603b2fe237e05b23fb5d2cdd67debb8b6959c3f Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Wed, 17 May 2023 11:37:54 +0800 Subject: [PATCH] fix:association select no options when clearing filter (#1866) * fix: inherit fields filter Foreign Key fields * fix: association select no options displayed when clearing filter * fix: association select no options displayed when clearing filter --- .../antd/remote-select/RemoteSelect.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 eeb1a70ce..069b0ee16 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 @@ -146,11 +146,13 @@ const InternalRemoteSelect = connect( const onSearch = async (search) => { run({ filter: mergeFilter([ - { - [fieldNames.label]: { - [operator]: search, - }, - }, + search + ? { + [fieldNames.label]: { + [operator]: search, + }, + } + : {}, field.componentProps?.service?.params?.filter || service?.params?.filter, ]), });