From 2459617173c57d2aafb45cdb03b5c1e84aa7a5e9 Mon Sep 17 00:00:00 2001 From: splohmer <113967431+splohmer@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:45:37 +0100 Subject: [PATCH] fix after insert new row, data is not written to the correct row After a new row is added, the data is moved, but inside the data row for each column the rowIndex is stored but not updated. --- lib/src/sheet/sheet.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/sheet/sheet.dart b/lib/src/sheet/sheet.dart index 079c6717..9d8d6196 100644 --- a/lib/src/sheet/sheet.dart +++ b/lib/src/sheet/sheet.dart @@ -647,6 +647,9 @@ class Sheet { } if (rowIndex <= rowKey) { _data[rowKey + 1] = _sheetData[rowKey]!; + _data[rowKey + 1]!.forEach((key, value) { + value._rowIndex++; + }); } }); }