mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
feat(views/table): force a refresh if data tree changes
This commit is contained in:
@@ -14,7 +14,7 @@ export type TableData = {
|
||||
|
||||
export async function buildRowDefinitions(parentNote: FNote, infos: AttributeDefinitionInformation[]) {
|
||||
const definitions: TableData[] = [];
|
||||
let hasChildren = false;
|
||||
let hasSubtree = false;
|
||||
for (const branch of parentNote.getChildBranches()) {
|
||||
const note = await branch.getNote();
|
||||
if (!note) {
|
||||
@@ -42,7 +42,7 @@ export async function buildRowDefinitions(parentNote: FNote, infos: AttributeDef
|
||||
|
||||
if (note.hasChildren()) {
|
||||
def._children = (await buildRowDefinitions(note, infos)).definitions;
|
||||
hasChildren = true;
|
||||
hasSubtree = true;
|
||||
}
|
||||
|
||||
definitions.push(def);
|
||||
@@ -50,7 +50,7 @@ export async function buildRowDefinitions(parentNote: FNote, infos: AttributeDef
|
||||
|
||||
return {
|
||||
definitions,
|
||||
hasChildren
|
||||
hasSubtree
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user