Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 6ffdc66

Browse files
committed
Merge branch 'bug/hide_completed_tasks'
2 parents db3839f + 4ddeb7f commit 6ffdc66

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/cellTypes/TaskCell.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,20 @@ const TaskCell = (taskProps: CellComponentProps) => {
1919
// Check if there are tasks in the cell
2020
if (taskValue) {
2121
taskRef.current.innerHTML = "";
22-
2322
if (
2423
(column.columnDef as TableColumn).config.task_hide_completed &&
2524
DataviewService.getDataviewAPI().isDataArray(taskValue)
2625
) {
27-
taskValue = taskValue.where((t: STask) => !t.completed);
26+
taskValue = taskValue
27+
.where((t: STask) => !t.completed)
28+
.map((t: STask) => {
29+
t.children = t.children?.filter((c: STask) => !c.completed);
30+
return t;
31+
});
2832
}
33+
2934
const taskComponent = new MarkdownRenderChild(taskRef.current);
35+
3036
DataviewService.getDataviewAPI().taskList(
3137
taskValue as Grouping<SListItem>,
3238
false,
@@ -36,7 +42,7 @@ const TaskCell = (taskProps: CellComponentProps) => {
3642
);
3743
view.addChild(taskComponent);
3844
}
39-
}, [cell.getValue()]);
45+
}, []);
4046
const taskRef = useRef<HTMLDivElement>();
4147

4248
return (

0 commit comments

Comments
 (0)