|
|
@ -210,27 +210,30 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (cmdOrCtrl) { |
|
|
|
if (cmdOrCtrl) { |
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
switch (e.key) { |
|
|
|
switch (e.key) { |
|
|
|
case 'ArrowUp': |
|
|
|
case 'ArrowUp': |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
selectedCell.row = 0 |
|
|
|
selectedCell.row = 0 |
|
|
|
selectedCell.col = selectedCell.col ?? 0 |
|
|
|
selectedCell.col = selectedCell.col ?? 0 |
|
|
|
scrollToCell?.() |
|
|
|
scrollToCell?.() |
|
|
|
editEnabled = false |
|
|
|
editEnabled = false |
|
|
|
return true |
|
|
|
return true |
|
|
|
case 'ArrowDown': |
|
|
|
case 'ArrowDown': |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
selectedCell.row = data.value.length - 1 |
|
|
|
selectedCell.row = data.value.length - 1 |
|
|
|
selectedCell.col = selectedCell.col ?? 0 |
|
|
|
selectedCell.col = selectedCell.col ?? 0 |
|
|
|
scrollToCell?.() |
|
|
|
scrollToCell?.() |
|
|
|
editEnabled = false |
|
|
|
editEnabled = false |
|
|
|
return true |
|
|
|
return true |
|
|
|
case 'ArrowRight': |
|
|
|
case 'ArrowRight': |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
selectedCell.row = selectedCell.row ?? 0 |
|
|
|
selectedCell.row = selectedCell.row ?? 0 |
|
|
|
selectedCell.col = fields.value?.length - 1 |
|
|
|
selectedCell.col = fields.value?.length - 1 |
|
|
|
scrollToCell?.() |
|
|
|
scrollToCell?.() |
|
|
|
editEnabled = false |
|
|
|
editEnabled = false |
|
|
|
return true |
|
|
|
return true |
|
|
|
case 'ArrowLeft': |
|
|
|
case 'ArrowLeft': |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
selectedCell.row = selectedCell.row ?? 0 |
|
|
|
selectedCell.row = selectedCell.row ?? 0 |
|
|
|
selectedCell.col = 0 |
|
|
|
selectedCell.col = 0 |
|
|
|
scrollToCell?.() |
|
|
|
scrollToCell?.() |
|
|
|