chore(react/ribbon): react to add new label/relation even when not shown

This commit is contained in:
Elian Doran
2025-08-27 13:05:51 +03:00
parent 9d760a21d5
commit 066f3ea078
5 changed files with 25 additions and 53 deletions

View File

@@ -1,11 +1,14 @@
import { useTriliumEvents } from "../react/hooks";
import AttributeEditor from "./components/AttributeEditor";
import { TabContext } from "./ribbon-interface";
export default function OwnedAttributesTab({ note, ...restProps }: TabContext) {
export default function OwnedAttributesTab({ note, hidden, activate, ...restProps }: TabContext) {
useTriliumEvents([ "addNewLabel", "addNewRelation" ], activate);
return (
<div className="attribute-list">
{ note && (
<AttributeEditor note={note} {...restProps} />
<AttributeEditor note={note} {...restProps} hidden={hidden} />
)}
</div>
)