Skip to content

Commit 77f1c36

Browse files
committed
[FIX] spreadsheet_oca: The tables overlap when added to an existing spreadsheet
Before these changes, when a table was added to an existing spreadsheet, it was always being added to row 0 of the sheet, since the call to getCell always returned undefined. After making these changes, the call is made correctly and the cell’s content is retrieved. Since the isEmpty function no longer exists, we now check directly whether it contains the content key.
1 parent e7b0703 commit 77f1c36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ export class ActionSpreadsheetOca extends Component {
147147
while (row >= 0) {
148148
for (var col = maxcols; col >= 0; col--) {
149149
if (
150-
spreadsheet_model.getters.getCell(sheetId, col, row) !==
151-
undefined &&
152-
!spreadsheet_model.getters.getCell(sheetId, col, row).isEmpty()
150+
spreadsheet_model.getters.getCell({ sheetId, col, row }) !== undefined &&
151+
spreadsheet_model.getters.getCell({ sheetId, col, row }).content
153152
) {
154153
filled = true;
155154
break;

0 commit comments

Comments
 (0)