From 8ea0d788625be710690d6028adca2d15d7b880a2 Mon Sep 17 00:00:00 2001 From: Xun Sun Date: Thu, 24 Apr 2025 10:09:17 +0800 Subject: [PATCH] fix(editor): preserve tag name updates on modifying tag color (#11744) --- .../data-view/src/core/component/tags/multi-tag-select.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts b/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts index be1383eee..e5779c884 100644 --- a/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts +++ b/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts @@ -72,7 +72,7 @@ export type TagManagerOptions = { }; class TagManager { - changeTag = (option: SelectTag) => { + changeTag = (option: Partial) => { this.ops.onOptionsChange( this.ops.options.value.map(item => { if (item.id === option.id) { @@ -207,7 +207,7 @@ export class MultiTagSelect extends SignalWatcher( initialValue: option.value, onChange: text => { this.tagManager.changeTag({ - ...option, + id: option.id, value: text, }); }, @@ -237,7 +237,7 @@ export class MultiTagSelect extends SignalWatcher( isSelected: option.color === item.color, select: () => { this.tagManager.changeTag({ - ...option, + id: option.id, color: item.color, }); },