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 =>