FIX: Cell editor correct behaviour

This commit is contained in:
Nicolás Hatcher
2024-10-10 18:38:47 +02:00
committed by Nicolás Hatcher Andrés
parent f26cdd3a4b
commit 42c1a39131
7 changed files with 497 additions and 110 deletions

View File

@@ -154,10 +154,12 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
focus: "cell",
referencedRange: null,
activeRanges: [],
mode: "accept",
});
setRedrawId((id) => id + 1);
},
onCellEditStart: (): void => {
// User presses F2, we start editing at the edn of the text
const { sheet, row, column } = model.getSelectedView();
const text = model.getCellContent(sheet, row, column);
workbookState.setEditingCell({
@@ -170,6 +172,7 @@ const Workbook = (props: { model: Model; workbookState: WorkbookState }) => {
referencedRange: null,
focus: "cell",
activeRanges: [],
mode: "edit",
});
setRedrawId((id) => id + 1);
},