diff --git a/apps/client/src/widgets/ribbon/OwnedAttributesTab.tsx b/apps/client/src/widgets/ribbon/OwnedAttributesTab.tsx index 9169b3c2f..532e7ee29 100644 --- a/apps/client/src/widgets/ribbon/OwnedAttributesTab.tsx +++ b/apps/client/src/widgets/ribbon/OwnedAttributesTab.tsx @@ -2,13 +2,17 @@ import { useTriliumEvents } from "../react/hooks"; import AttributeEditor from "./components/AttributeEditor"; import { TabContext } from "./ribbon-interface"; -export default function OwnedAttributesTab({ note, hidden, activate, ...restProps }: TabContext) { - useTriliumEvents([ "addNewLabel", "addNewRelation" ], activate); +export default function OwnedAttributesTab({ note, hidden, activate, ntxId, ...restProps }: TabContext) { + useTriliumEvents([ "addNewLabel", "addNewRelation" ], ({ ntxId: eventNtxId }) => { + if (ntxId === eventNtxId) { + activate(); + } + }); return (