Skip to content

Commit

Permalink
fixes row indices not correctly updated on adding and deleting rows
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Oct 21, 2020
1 parent c9ff4a5 commit 0b72a35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
@@ -1,8 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.11.0-DEV] - 2020-10-20
## [2.11.0] - 2020-10-20
- added row_inner block to default editor template
- fixes row indices not correctly updated on adding and deleting rows

## [2.10.2] - 2020-10-15
- fixed an isse with new row positions
Expand Down
4 changes: 4 additions & 0 deletions src/Widget/MultiColumnEditor.php
Expand Up @@ -229,6 +229,8 @@ public function addRow(int $offset = 0)
$this->updateSession($offset);

array_insert($this->varValue, ($offset + 1), [$new]);

$this->sortRows();
}

/**
Expand All @@ -243,6 +245,8 @@ public function deleteRow(int $offset = 0)
$this->updateSession($offset, 'delete');

unset($this->varValue[$offset]);

$this->sortRows();
}

/**
Expand Down

0 comments on commit 0b72a35

Please sign in to comment.