Prevent immediately cell mutation by typing for readonly cells

This commit is contained in:
Andrew Kingston 2023-04-21 11:00:03 +01:00
parent f8a9af2458
commit ea78f7fede
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@
// Focuses the cell and starts entering a new value
const startEnteringValue = (key, keyCode) => {
if ($focusedCellAPI) {
if ($focusedCellAPI && !$focusedCellAPI.isReadonly()) {
const type = $focusedCellAPI.getType()
if (type === "number" && keyCodeIsNumber(keyCode)) {
$focusedCellAPI.setValue(parseInt(key))