From 690c72a82564fdf21f4327e8bfb6c6293b9610da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 20 Oct 2024 16:05:33 -0400 Subject: [PATCH] only show all list fields if `displayedFields` is undefined --- src/api/ui/views/task.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/ui/views/task.tsx b/src/api/ui/views/task.tsx index 7c37e563..bf6bbaeb 100644 --- a/src/api/ui/views/task.tsx +++ b/src/api/ui/views/task.tsx @@ -190,7 +190,7 @@ function CollapseIndicator({ * @group Components */ export function ListItemFields({ - displayedFields: displayedFieldsProp = [], + displayedFields: displayedFieldsProp, item, }: { displayedFields?: TaskProps["displayedFields"]; @@ -200,7 +200,7 @@ export function ListItemFields({ const core = useContext(DATACORE_CONTEXT); const { settings } = core; const displayedFields = useMemo(() => { - if (displayedFieldsProp.length) return displayedFieldsProp; + if (displayedFieldsProp != undefined) return displayedFieldsProp; else { return Object.values(item.$infields).map((f) => { return {