Browse Source

fix: Added dbl click to open edit column modal for Virtual column header

pull/6803/head
Muhammed Mustafa 1 year ago
parent
commit
622a00fac6
  1. 14
      packages/nc-gui/components/smartsheet/header/VirtualCell.vue

14
packages/nc-gui/components/smartsheet/header/VirtualCell.vue

@ -30,6 +30,8 @@ const column = toRef(props, 'column')
const hideMenu = toRef(props, 'hideMenu')
const { isMobileMode } = useGlobal()
const editColumnDropdown = ref(false)
const isDropDownOpen = ref(false)
@ -120,10 +122,20 @@ const closeAddColumnDropdown = () => {
columnOrder.value = null
editColumnDropdown.value = false
}
const openHeaderMenu = () => {
if (!isForm.value && !isExpandedForm.value && isUIAllowed('fieldEdit') && !isMobileMode.value) {
editColumnDropdown.value = true
}
}
</script>
<template>
<div class="flex items-center w-full text-xs text-gray-500 font-weight-medium" @click.right="isDropDownOpen = !isDropDownOpen">
<div
class="flex items-center w-full h-full text-xs text-gray-500 font-weight-medium"
@dblclick="openHeaderMenu"
@click.right="isDropDownOpen = !isDropDownOpen"
>
<LazySmartsheetHeaderVirtualCellIcon v-if="column && !props.hideIcon" />
<a-tooltip placement="bottom">

Loading…
Cancel
Save