Browse Source

fix: Rename View In Dropdown menu #7136

pull/7148/head
Ramesh Mane 12 months 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()
/** Rename a view */
@ -268,7 +279,7 @@ watch(isDropdownOpen, async () => {
:table="table"
in-sidebar
@close-modal="isDropdownOpen = false"
@rename="onRename"
@rename="onRenameMenuClick"
@delete="onDelete"
/>
</template>

Loading…
Cancel
Save