diff --git a/src/Components/Operation.php b/src/Components/Operation.php index fd47648d..4e127271 100644 --- a/src/Components/Operation.php +++ b/src/Components/Operation.php @@ -141,6 +141,11 @@ public function handleOperations(\Nette\Forms\Controls\SubmitButton $button) if ($this->presenter->isAjax()) { $grid['form'][self::ID][self::ID]->setValue(NULL); $grid->getData(TRUE, FALSE); + foreach ($form[self::ID]->getControls() as $ctrl) { + if ($ctrl instanceof \Nette\Forms\Controls\Checkbox) { + $ctrl->setValue(false); + } + } } $grid->reload(); diff --git a/src/Grid.php b/src/Grid.php index 3f95b403..08871a83 100644 --- a/src/Grid.php +++ b/src/Grid.php @@ -476,9 +476,7 @@ public function getData($applyPaging = TRUE, $useCache = TRUE, $fetch = TRUE) $data = $this->getModel()->getData(); - if ($useCache === TRUE) { - $this->data = $data; - } + $this->data = $useCache ? $data : null; if ($applyPaging && !empty($data) && !in_array($this->page, range(1, $this->getPaginator()->pageCount))) { $this->__triggerUserNotice("Page is out of range.");