From 8b3e3c2c3a5df717a94bdbe0f36064dcc3581762 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 15 Feb 2026 16:56:37 +0200 Subject: [PATCH] chore(react): not reacting properly to deleted relations --- apps/client/src/widgets/react/hooks.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index 8eb2cc0efd..c41e1e1a1c 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -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; } } });