fix: gantt expansion exception

This commit is contained in:
katherinehhh 2023-03-21 13:35:32 +08:00
parent 361e9da55e
commit 19cbda4b0c

View File

@ -93,7 +93,7 @@ export const useGanttBlockProps = () => {
if (!ctx?.service?.loading) {
const data = formatData(ctx.service.data?.data, ctx.fieldNames);
const mergeTasks = data.map((v) => {
const task = tasks.find((k) => k.id === v.id) || { hideChildren: true };
const task = ctx.field.data.find((k) => k.id === v.id) || { hideChildren: true };
return {
...v,
hideChildren: task?.hideChildren,