feat(views/table): force a refresh if data tree changes

This commit is contained in:
Elian Doran
2025-07-14 16:58:14 +03:00
parent 38fce25b86
commit fcbbc21a80
5 changed files with 19 additions and 12 deletions

View File

@@ -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
};
}