Skip to content
Snippets Groups Projects
Commit 196721c3 authored by rhenck's avatar rhenck
Browse files

Table: Fix removing child elements

The index was one off, when looking up the correct child element.
parent b43fa356
No related branches found
No related tags found
Loading
Pipeline #60826 passed
...@@ -126,7 +126,7 @@ export class TableComponent extends CompoundElementComponent implements OnInit { ...@@ -126,7 +126,7 @@ export class TableComponent extends CompoundElementComponent implements OnInit {
removeElement(row: number, col: number): void { removeElement(row: number, col: number): void {
this.elementRemoved.emit(this.elementGrid.flat() this.elementRemoved.emit(this.elementGrid.flat()
.findIndex(el => el?.position.gridRow === row && el?.position.gridColumn === col)); .findIndex(el => el?.position.gridRow === (row + 1) && el?.position.gridColumn === (col + 1)));
this.refresh(); this.refresh();
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment