diff --git a/src/DataGrid.php b/src/DataGrid.php index 81e328da..73c6ee57 100644 --- a/src/DataGrid.php +++ b/src/DataGrid.php @@ -1495,7 +1495,10 @@ public function filterSucceeded(NetteForm $form): void return; } - $values = (array) $form->getUnsafeValues(null); + $values = (array) $form->getUnsafeValues(null, [ + $form['perPage'], + $form['filter'], + ]); if ($this->getPresenterInstance()->isAjax()) { if (isset($form['group_action']['submit']) && $form['group_action']['submit']->isSubmittedBy()) { @@ -1535,7 +1538,7 @@ public function filterSucceeded(NetteForm $form): void $primaryWhereColumn = $form->getHttpData(Form::DATA_LINE, 'inline_edit[_primary_where_column]'); if ($edit['submit']->isSubmittedBy() && $edit->getErrors() === []) { - $this->inlineEdit->onSubmit($id, $values['inline_edit']); + $this->inlineEdit->onSubmit($id, $form['inline_edit']->getUnsafeValues(null)); $this->getPresenterInstance()->payload->_datagrid_inline_edited = $id; $this->getPresenterInstance()->payload->_datagrid_name = $this->getFullName(); } else { @@ -1577,7 +1580,7 @@ public function filterSucceeded(NetteForm $form): void if ($add['submit']->isSubmittedBy() || $add['cancel']->isSubmittedBy()) { if ($add['submit']->isSubmittedBy() && $add->getErrors() === []) { - $this->inlineAdd->onSubmit($values['inline_add']); + $this->inlineAdd->onSubmit($form['inline_add']->getUnsafeValues(null)); } $this->redrawControl('tbody');