mirror of
https://github.com/zadam/trilium.git
synced 2026-02-19 20:24:28 +01:00
chore(react): not reacting properly to deleted relations
This commit is contained in:
parent
ec8b0a3801
commit
8b3e3c2c3a
@ -551,7 +551,12 @@ export function useNoteRelation(note: FNote | undefined | null, relationName: Re
|
||||
useTriliumEvent("entitiesReloaded", ({ loadResults }) => {
|
||||
for (const attr of loadResults.getAttributeRows()) {
|
||||
if (attr.type === "relation" && attr.name === relationName && attributes.isAffecting(attr, note)) {
|
||||
setRelationValue(attr.value ?? null);
|
||||
if (!attr.isDeleted) {
|
||||
setRelationValue(attr.value ?? null);
|
||||
} else {
|
||||
setRelationValue(null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -601,6 +606,7 @@ export function useNoteLabel(note: FNote | undefined | null, labelName: FilterLa
|
||||
} else {
|
||||
setLabelValue(null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user