From c3e9cbcfd6ce73e74933ee0b372e821ddc9a5079 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Mon, 28 Mar 2022 13:10:10 +0200 Subject: [PATCH] fix component styles --- .../editor-ui/src/components/NodeSettings.vue | 9 +++++- .../editor-ui/src/components/NodeTitle.vue | 30 +++++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/packages/editor-ui/src/components/NodeSettings.vue b/packages/editor-ui/src/components/NodeSettings.vue index 95a143287d..2fc531d9ef 100644 --- a/packages/editor-ui/src/components/NodeSettings.vue +++ b/packages/editor-ui/src/components/NodeSettings.vue @@ -2,7 +2,7 @@
- +
-

Rename node

- -
- - +
+ Rename node + +
+ + +
- {{name}} + {{value}} @@ -26,7 +28,7 @@ import Vue from 'vue'; export default Vue.extend({ name: 'NodeTitle', props: { - name: { + value: { type: String, }, nodeType: { @@ -40,11 +42,17 @@ export default Vue.extend({ }, methods: { onEdit() { - this.newName = this.name; + this.newName = this.value; this.editName = true; + this.$nextTick(() => { + const input = this.$refs.input; + if (input) { + (input as HTMLInputElement).focus(); + } + }); }, onRename() { - this.$emit('update', this.newName); + this.$emit('input', this.newName); this.editName = false; }, }, @@ -90,4 +98,8 @@ export default Vue.extend({ margin-left: var(--spacing-4xs); } } + +.editContainer { + text-align: left; +}