Browse Source

fix: Fixed column dropdown coming up on mobile view

pull/6498/head
Muhammed Mustafa 1 year ago
parent
commit
f5f0a596d7
  1. 6
      packages/nc-gui/components/smartsheet/header/Cell.vue

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

@ -11,6 +11,8 @@ interface Props {
const props = defineProps<Props>() const props = defineProps<Props>()
const { isMobileMode } = useGlobal()
const hideMenu = toRef(props, 'hideMenu') const hideMenu = toRef(props, 'hideMenu')
const isForm = inject(IsFormInj, ref(false)) const isForm = inject(IsFormInj, ref(false))
@ -42,13 +44,13 @@ const closeAddColumnDropdown = () => {
} }
const openHeaderMenu = () => { const openHeaderMenu = () => {
if (!isForm.value && !isExpandedForm.value && isUIAllowed('fieldEdit')) { if (!isForm.value && !isExpandedForm.value && isUIAllowed('fieldEdit') && !isMobileMode.value) {
editColumnDropdown.value = true editColumnDropdown.value = true
} }
} }
const openDropDown = () => { const openDropDown = () => {
if (isForm.value || isExpandedForm.value || !isUIAllowed('fieldEdit')) return if (isForm.value || isExpandedForm.value || (!isUIAllowed('fieldEdit') && !isMobileMode.value)) return
isDropDownOpen.value = !isDropDownOpen.value isDropDownOpen.value = !isDropDownOpen.value
} }
</script> </script>

Loading…
Cancel
Save