From 05023a084316935f9b031b2d512722d6b63e75ae Mon Sep 17 00:00:00 2001 From: Mutasem Date: Fri, 8 Apr 2022 12:57:09 +0200 Subject: [PATCH] ignore empty input, trim node name --- packages/editor-ui/src/components/NodeTitle.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/NodeTitle.vue b/packages/editor-ui/src/components/NodeTitle.vue index 1c880f694f..067d853c4d 100644 --- a/packages/editor-ui/src/components/NodeTitle.vue +++ b/packages/editor-ui/src/components/NodeTitle.vue @@ -57,7 +57,10 @@ export default Vue.extend({ }); }, onRename() { - this.$emit('input', this.newName); + if (this.newName.trim() !== '') { + this.$emit('input', this.newName.trim()); + } + this.editName = false; }, },