From 4547b7dd9686dc8f00c62752d045e6bea046601b Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Mon, 28 Apr 2025 14:25:15 +0800 Subject: [PATCH] fix(Collapse): issue with data scope being cleared (#6782) --- packages/core/client/src/block-provider/hooks/index.ts | 1 + .../antd/association-filter/AssociationFilter.Item.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index 9f47f4e6c2..4b4e420920 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1451,6 +1451,7 @@ export const useAssociationFilterBlockProps = () => { run, valueKey, labelKey, + dataScopeFilter: filter, }; }; async function doReset({ diff --git a/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx b/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx index c439277ae6..eb163b25bd 100644 --- a/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx +++ b/packages/core/client/src/schema-component/antd/association-filter/AssociationFilter.Item.tsx @@ -41,6 +41,7 @@ export const AssociationFilterItem = withDynamicSchemaProps( handleSearchInput: _handleSearchInput, params, run, + dataScopeFilter, valueKey: _valueKey, labelKey: _labelKey, defaultCollapse, @@ -94,7 +95,7 @@ export const AssociationFilterItem = withDynamicSchemaProps( if (searchVisible || filter) { run({ ...params?.[0], - filter: undefined, + filter: dataScopeFilter, }); } setSearchVisible(!searchVisible);