fix: incorrect data filtering in popup Kanban using popup record variables (#6290)

This commit is contained in:
Katherine 2025-02-26 16:51:28 +08:00 committed by GitHub
parent 9d3497811b
commit 55b70335cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ import {
useBlockRequestContext,
useCollection,
useCollection_deprecated,
useParsedFilter,
} from '@nocobase/client';
import { Spin } from 'antd';
import { isEqual } from 'lodash';
@ -66,14 +67,17 @@ const InternalKanbanBlockProvider = (props) => {
};
export const KanbanBlockProvider = (props) => {
const params = { ...props.params };
const { filter: parsedFilter } = useParsedFilter({
filterOption: props.params?.filter,
});
const params = { ...props.params, filter: parsedFilter };
return (
<BlockProvider name="kanban" {...props} params={params}>
<InternalKanbanBlockProvider {...props} params={params} />
</BlockProvider>
);
};
export const useKanbanBlockContext = () => {
return useContext(KanbanBlockContext);
};