From 98241fb54bbc9bf3ddefeee1cfb13025e7ac22fa Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 1 Dec 2025 13:30:03 +0200 Subject: [PATCH] fix(promoted_attributes): value carrying over onto new notes --- apps/client/src/services/utils.ts | 2 +- apps/client/src/widgets/PromotedAttributes.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/client/src/services/utils.ts b/apps/client/src/services/utils.ts index b11578bb6..3febb37c2 100644 --- a/apps/client/src/services/utils.ts +++ b/apps/client/src/services/utils.ts @@ -207,7 +207,7 @@ function toObject(array: T[], fn: (arg0: T) => [key: string, value: R]) { return obj; } -function randomString(len: number) { +export function randomString(len: number) { let text = ""; const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; diff --git a/apps/client/src/widgets/PromotedAttributes.tsx b/apps/client/src/widgets/PromotedAttributes.tsx index 6565c4ed7..776b86fee 100644 --- a/apps/client/src/widgets/PromotedAttributes.tsx +++ b/apps/client/src/widgets/PromotedAttributes.tsx @@ -14,8 +14,10 @@ import ws from "../services/ws"; import { UpdateAttributeResponse } from "@triliumnext/commons"; import attributes from "../services/attributes"; import debounce from "../services/debounce"; +import { randomString } from "../services/utils"; interface Cell { + uniqueId: string; definitionAttr: FAttribute; definition: DefinitionObject; valueAttr: Attribute; @@ -44,6 +46,7 @@ export default function PromotedAttributes() {
{cells && cells.length > 0 &&
{note && cells?.map(cell =>