|
|
@ -24,6 +24,7 @@ import { |
|
|
|
useI18n, |
|
|
|
useI18n, |
|
|
|
useMetas, |
|
|
|
useMetas, |
|
|
|
useProject, |
|
|
|
useProject, |
|
|
|
|
|
|
|
useUIPermission, |
|
|
|
} from '#imports' |
|
|
|
} from '#imports' |
|
|
|
|
|
|
|
|
|
|
|
const MAIN_MOUSE_PRESSED = 0 |
|
|
|
const MAIN_MOUSE_PRESSED = 0 |
|
|
@ -73,6 +74,9 @@ export function useMultiSelect( |
|
|
|
() => !(activeCell.row === null || activeCell.col === null || isNaN(activeCell.row) || isNaN(activeCell.col)), |
|
|
|
() => !(activeCell.row === null || activeCell.col === null || isNaN(activeCell.row) || isNaN(activeCell.col)), |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
const hasEditPermission = $computed(() => isUIAllowed('xcDatatableEditable')) |
|
|
|
|
|
|
|
|
|
|
|
function makeActive(row: number, col: number) { |
|
|
|
function makeActive(row: number, col: number) { |
|
|
|
if (activeCell.row === row && activeCell.col === col) { |
|
|
|
if (activeCell.row === row && activeCell.col === col) { |
|
|
|
return |
|
|
|
return |
|
|
@ -343,6 +347,9 @@ export function useMultiSelect( |
|
|
|
// paste - ctrl/cmd + v
|
|
|
|
// paste - ctrl/cmd + v
|
|
|
|
case 86: |
|
|
|
case 86: |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
// if edit permission is not there, return
|
|
|
|
|
|
|
|
if (!hasEditPermission) return |
|
|
|
|
|
|
|
|
|
|
|
// handle belongs to column
|
|
|
|
// handle belongs to column
|
|
|
|
if ( |
|
|
|
if ( |
|
|
|
columnObj.uidt === UITypes.LinkToAnotherRecord && |
|
|
|
columnObj.uidt === UITypes.LinkToAnotherRecord && |
|
|
|