Skip to content

Commit 4d9b392

Browse files
committed
Fixed bug with indices when removing rows
1 parent c205b89 commit 4d9b392

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

js/composite_table.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ const compositeTable = class {
9191
}
9292

9393
removeRow(idx) {
94+
for (let i = idx + 1; i < this.rows.length; i++) {
95+
this.rows[i].updateIndex(i - 1)
96+
};
97+
9498
this.rows[idx].remove();
9599
this.rows.splice(idx, 1);
96100
this.nRows--

0 commit comments

Comments
 (0)