Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(note): optimize the generation of IDs when add note for the first time (#6619)
wpxp1234566bd5519b3ccc
diff --git a/packages/sheets-note-ui/src/views/note.tsx b/packages/sheets-note-ui/src/views/note.tsxindex 027f1ac035..5b1319de33 100644--- a/packages/sheets-note-ui/src/views/note.tsx+++ b/packages/sheets-note-ui/src/views/note.tsx@@ -18,7 +18,7 @@ import type { ISheetLocationBase } from '@univerjs/sheets';import type { ISheetNote } from '@univerjs/sheets-note';import type { IPopup } from '@univerjs/ui';import type { IUniverSheetsNoteUIConfig } from '../controllers/config.schema';-import { ICommandService, LocaleService } from '@univerjs/core';+import { generateRandomId, ICommandService, LocaleService } from '@univerjs/core';import { clsx, Textarea } from '@univerjs/design';import { IRenderManagerService } from '@univerjs/engine-render';import { SheetsNoteModel, SheetUpdateNoteCommand } from '@univerjs/sheets-note';@@ -60,6 +60,7 @@ export const SheetsNote = (props: { popup: IPopup<{ location: INotePopupLocationif (!note) {const initNote: Partial<ISheetNote> = {+ id: generateRandomId(6),width,height,note: '',