Browse Source

fix: Removed white line coming up when column header is right clicked and skipped column column selection logic when left/right clicked when edit column modal is opened

pull/6803/head
Muhammed Mustafa 1 year ago
parent
commit
d984662ba9
  1. 17
      packages/nc-gui/components/smartsheet/header/Cell.vue
  2. 11
      packages/nc-gui/components/smartsheet/header/VirtualCell.vue

17
packages/nc-gui/components/smartsheet/header/Cell.vue

@ -51,10 +51,23 @@ const openHeaderMenu = () => {
}
}
const openDropDown = () => {
const openDropDown = (e: Event) => {
if (isForm.value || isExpandedForm.value || (!isUIAllowed('fieldEdit') && !isMobileMode.value)) return
e.preventDefault()
e.stopPropagation()
isDropDownOpen.value = !isDropDownOpen.value
}
const onClick = (e: Event) => {
if (isDropDownOpen.value) {
e.preventDefault()
e.stopPropagation()
}
isDropDownOpen.value = false
}
</script>
<template>
@ -63,7 +76,7 @@ const openDropDown = () => {
:class="{ 'h-full': column, '!text-gray-400': isKanban }"
@dblclick="openHeaderMenu"
@click.right="openDropDown"
@click="isDropDownOpen = false"
@click="onClick"
>
<SmartsheetHeaderCellIcon
v-if="column && !props.hideIcon"

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

@ -128,13 +128,22 @@ const openHeaderMenu = () => {
editColumnDropdown.value = true
}
}
const openDropDown = (e: Event) => {
if (isForm.value || isExpandedForm.value || (!isUIAllowed('fieldEdit') && !isMobileMode.value)) return
e.preventDefault()
e.stopPropagation()
isDropDownOpen.value = !isDropDownOpen.value
}
</script>
<template>
<div
class="flex items-center w-full h-full text-xs text-gray-500 font-weight-medium"
@dblclick="openHeaderMenu"
@click.right="isDropDownOpen = !isDropDownOpen"
@click.right="openDropDown"
>
<LazySmartsheetHeaderVirtualCellIcon v-if="column && !props.hideIcon" />

Loading…
Cancel
Save