Skip to content

Commit 93c560e

Browse files
committed
Modify ComponentBlock.mrcNameFieldValidator to call editor.updateToolboxAfterDelay to update the component name in the toolbox.
1 parent e0ca4e4 commit 93c560e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/blocks/mrc_component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ const COMPONENT = {
172172
if (oldName && oldName !== name && oldName !== legalName) {
173173
// Rename any callers.
174174
renameMethodCallers(this.workspace, this.mrcComponentId, legalName);
175+
const editor = Editor.getEditorForBlocklyWorkspace(this.workspace);
176+
if (editor) {
177+
editor.updateToolboxAfterDelay();
178+
}
175179
}
176180
return legalName;
177181
},

0 commit comments

Comments
 (0)