fix: Dblclick and right click to column header will not do anything for locked mode

This commit is contained in:
Muhammed Mustafa
2023-11-23 07:02:55 +00:00
parent a8c6085c00
commit 20f72c99a2
2 changed files with 12 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ const editColumnDropdown = ref(false)
const isDropDownOpen = ref(false)
const isLocked = inject(IsLockedInj, ref(false))
provide(ColumnInj, column)
const { metas } = useMetas()
@@ -124,12 +126,16 @@ const closeAddColumnDropdown = () => {
}
const openHeaderMenu = () => {
if (isLocked.value) return
if (!isForm.value && !isExpandedForm.value && isUIAllowed('fieldEdit') && !isMobileMode.value) {
editColumnDropdown.value = true
}
}
const openDropDown = (e: Event) => {
if (isLocked.value) return
if (isForm.value || isExpandedForm.value || (!isUIAllowed('fieldEdit') && !isMobileMode.value)) return
e.preventDefault()