fix: make e2e tests pass

This commit is contained in:
Zeke Zhang 2024-10-26 19:33:03 +08:00
parent 1145721d48
commit e511f029d6

View File

@ -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;
};