Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(views/board): display even if no children
Elian Doranec021be16c64
diff --git a/apps/client/src/components/note_context.ts b/apps/client/src/components/note_context.tsindex 75c66b1bcf..1bc4e5498e 100644--- a/apps/client/src/components/note_context.ts+++ b/apps/client/src/components/note_context.ts@@ -325,8 +325,9 @@ class NoteContext extends Component implements EventListener<"entitiesReloaded">return false;}- // Some book types must always display a note list, even if no children.- if (["calendar", "table", "geoMap"].includes(note.getLabelValue("viewType") ?? "")) {+ // Collections must always display a note list, even if no children.+ const viewType = note.getLabelValue("viewType") ?? "grid";+ if (!["list", "grid"].includes(viewType)) {return true;}diff --git a/apps/client/src/widgets/type_widgets/book.ts b/apps/client/src/widgets/type_widgets/book.tsindex cc8323e1f4..ba32fd3a6c 100644--- a/apps/client/src/widgets/type_widgets/book.ts+++ b/apps/client/src/widgets/type_widgets/book.ts@@ -45,12 +45,11 @@ export default class BookTypeWidget extends TypeWidget {}switch (this.note?.getAttributeValue("label", "viewType")) {- case "calendar":- case "table":- case "geoMap":- return false;- default:+ case "list":+ case "grid":return true;+ default:+ return false;}}