diff --git a/core/core-frontend/src/components/visualization/DvSidebar.vue b/core/core-frontend/src/components/visualization/DvSidebar.vue index 3fb7b283b3..b3064ddae9 100644 --- a/core/core-frontend/src/components/visualization/DvSidebar.vue +++ b/core/core-frontend/src/components/visualization/DvSidebar.vue @@ -104,17 +104,19 @@ const closeEditComponentName = () => { } const editComponentName = () => { - componentNameEdit.value = true - if (isViewTitle.value) { - inputComponentName.value.name = view.value.title - inputComponentName.value.id = view.value.id - } else { - inputComponentName.value.name = element.value.name - inputComponentName.value.id = element.value.id + if (element.value?.id || view.value?.id) { + componentNameEdit.value = true + if (isViewTitle.value) { + inputComponentName.value.name = view.value.title + inputComponentName.value.id = view.value.id + } else { + inputComponentName.value.name = element.value.name + inputComponentName.value.id = element.value.id + } + nextTick(() => { + componentNameInputAttr.value.focus() + }) } - nextTick(() => { - componentNameInputAttr.value.focus() - }) } const onComponentNameChange = () => { diff --git a/core/core-frontend/src/views/dashboard/index.vue b/core/core-frontend/src/views/dashboard/index.vue index 8d06d8bb3b..bf731bc727 100644 --- a/core/core-frontend/src/views/dashboard/index.vue +++ b/core/core-frontend/src/views/dashboard/index.vue @@ -344,6 +344,7 @@ onUnmounted(() => { :title="t('visualization.dashboard_configuration')" :width="420" aside-position="right" + side-name="canvas" class="left-sidebar" >