Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(promoted_attributes): editing with multiplicity modifies all displayed values (closes #7992)
Elian Doranf09d918695bf
diff --git a/apps/client/src/widgets/PromotedAttributes.tsx b/apps/client/src/widgets/PromotedAttributes.tsxindex cb6dc26713..33997949b2 100644--- a/apps/client/src/widgets/PromotedAttributes.tsx+++ b/apps/client/src/widgets/PromotedAttributes.tsx@@ -116,7 +116,7 @@ export function usePromotedAttributeData(note: FNote | null | undefined, componevalueAttr.attributeId = "";}- const uniqueId = `${note.noteId}-${valueAttr.name}-${i}`;+ const uniqueId = crypto.randomUUID();cells.push({ definitionAttr, definition, valueAttr, valueName, uniqueId });}}@@ -319,6 +319,7 @@ function MultiplicityCell({ cell, cells, setCells, setCellToFocus, note, componeconst index = cells.indexOf(cell);const newCell: Cell = {...cell,+ uniqueId: crypto.randomUUID(),valueAttr: {attributeId: "",type: cell.valueAttr.type,