|
|
@ -173,8 +173,16 @@ const getContainerScrollForElement = ( |
|
|
|
return scroll |
|
|
|
return scroll |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { isCellSelected, activeCell, handleMouseDown, handleMouseOver, handleCellClick, clearSelectedRange, copyValue } = |
|
|
|
const { |
|
|
|
useMultiSelect( |
|
|
|
isCellSelected, |
|
|
|
|
|
|
|
activeCell, |
|
|
|
|
|
|
|
handleMouseDown, |
|
|
|
|
|
|
|
handleMouseOver, |
|
|
|
|
|
|
|
handleCellClick, |
|
|
|
|
|
|
|
clearSelectedRange, |
|
|
|
|
|
|
|
copyValue, |
|
|
|
|
|
|
|
isCellActive, |
|
|
|
|
|
|
|
} = useMultiSelect( |
|
|
|
meta, |
|
|
|
meta, |
|
|
|
fields, |
|
|
|
fields, |
|
|
|
data, |
|
|
|
data, |
|
|
@ -202,7 +210,7 @@ const { isCellSelected, activeCell, handleMouseDown, handleMouseOver, handleCell |
|
|
|
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey |
|
|
|
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey |
|
|
|
const altOrOptionKey = e.altKey |
|
|
|
const altOrOptionKey = e.altKey |
|
|
|
if (e.key === ' ') { |
|
|
|
if (e.key === ' ') { |
|
|
|
if (activeCell.row != null && !isNaN(activeCell.row) && !editEnabled && hasEditPermission) { |
|
|
|
if (isCellActive.value && !editEnabled && hasEditPermission) { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
|
clearSelectedRange() |
|
|
|
clearSelectedRange() |
|
|
|
const row = data.value[activeCell.row] |
|
|
|
const row = data.value[activeCell.row] |
|
|
@ -226,7 +234,7 @@ const { isCellSelected, activeCell, handleMouseDown, handleMouseOver, handleCell |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (cmdOrCtrl) { |
|
|
|
if (cmdOrCtrl) { |
|
|
|
if (activeCell.row === null || isNaN(activeCell.row) || activeCell.col === null || isNaN(activeCell.col)) return |
|
|
|
if (!isCellActive.value) return |
|
|
|
|
|
|
|
|
|
|
|
switch (e.key) { |
|
|
|
switch (e.key) { |
|
|
|
case 'ArrowUp': |
|
|
|
case 'ArrowUp': |
|
|
|