Browse Source

fix: Rename View In Dropdown menu #7136

pull/7148/head
Ramesh Mane 1 year ago
parent
commit
3d0abaaa11
  1. 13
      packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue

13
packages/nc-gui/components/dashboard/TreeView/ViewsNode.vue

@ -128,6 +128,17 @@ onKeyStroke('Enter', (event) => {
} }
}) })
const onRenameMenuClick = () => {
if (isMobileMode.value) return
if (!isUIAllowed('viewCreateOrEdit')) return
if (!isEditing.value) {
isEditing.value = true
_title.value = vModel.value.title
$e('c:view:rename', { view: vModel.value?.type })
}
}
const focusInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus() const focusInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
/** Rename a view */ /** Rename a view */
@ -268,7 +279,7 @@ watch(isDropdownOpen, async () => {
:table="table" :table="table"
in-sidebar in-sidebar
@close-modal="isDropdownOpen = false" @close-modal="isDropdownOpen = false"
@rename="onRename" @rename="onRenameMenuClick"
@delete="onDelete" @delete="onDelete"
/> />
</template> </template>

Loading…
Cancel
Save