From bba5782cd42f31b2bca2a46fc979b8b9cb1b003a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Kutn=C3=BD?= Date: Tue, 14 Mar 2017 12:19:15 +0100 Subject: [PATCH] DataGrid: after edit redraw all rows After editing the row could not be in result when not ordered by ID w. If there are data in grid sorted by name and i change the name using inline edit this row can be now on different page and grid needs to redraw all rows. --- src/Datagrid.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Datagrid.php b/src/Datagrid.php index 025395f..4db59ae 100644 --- a/src/Datagrid.php +++ b/src/Datagrid.php @@ -489,9 +489,7 @@ public function processForm(UI\Form $form) } } if ($form['edit']['cancel']->isSubmittedBy() || ($form['edit']['save']->isSubmittedBy() && $form['edit']->isValid())) { - $editRowKey = $form['edit'][$this->rowPrimaryKey]->getValue(); - $this->redrawRow($editRowKey); - $this->getData($editRowKey); + $this->redrawControl('rows'); } if ($this->editRowKey !== null) { $this->redrawRow($this->editRowKey);