From e511f029d6376a69748e9bbaaceb185c2f23ba71 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sat, 26 Oct 2024 19:33:03 +0800 Subject: [PATCH] fix: make e2e tests pass --- .../src/schema-component/antd/filter/useFilterActionProps.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/filter/useFilterActionProps.ts b/packages/core/client/src/schema-component/antd/filter/useFilterActionProps.ts index bd8414703b..6a3f8217fc 100644 --- a/packages/core/client/src/schema-component/antd/filter/useFilterActionProps.ts +++ b/packages/core/client/src/schema-component/antd/filter/useFilterActionProps.ts @@ -21,11 +21,12 @@ import { mergeFilter } from '../../../filter-provider/utils'; import { useDataLoadingMode } from '../../../modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem'; export const useGetFilterOptions = () => { - const cm = useCollectionManager(); + const dm = useDataSourceManager(); const getFilterFieldOptions = useGetFilterFieldOptions(); return (collectionName, dataSource?: string, usedInVariable?: boolean) => { - const fields = cm?.getCollectionFields(collectionName, dataSource); + const cm = dm?.getDataSource(dataSource)?.collectionManager; + const fields = cm?.getCollectionFields(collectionName); const options = getFilterFieldOptions(fields, usedInVariable); return options; };