Skip to content

Commit 796299e

Browse files
authored
Merge pull request #98 from smartemailing/fix-nette3.0
Fixed persistent parameters
2 parents d5dd094 + 7de66f0 commit 796299e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/Datagrid.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99

1010
namespace Nextras\Datagrid;
1111

12+
use Nette;
1213
use Nette\Application\UI;
1314
use Nette\Bridges\ApplicationLatte\Template;
14-
use Nette\ComponentModel\IComponent;
1515
use Nette\Forms\Container;
1616
use Nette\Forms\Controls\Button;
17-
use Nette\Forms\Controls\Checkbox;
1817
use Nette\Utils\Html;
1918
use Nette\Utils\Paginator;
2019
use Nette\Localization\ITranslator;
@@ -326,15 +325,14 @@ function invalidateRow($primaryValue)
326325

327326

328327
/*******************************************************************************/
329-
330-
331-
protected function attached(IComponent $presenter): void
328+
protected function validateParent(Nette\ComponentModel\IContainer $parent): void
332329
{
333-
parent::attached($presenter);
334-
$this->filterDataSource = $this->filter;
330+
parent::validateParent($parent);
331+
$this->monitor(UI\Presenter::class, function () {
332+
$this->filterDataSource = $this->filter;
333+
});
335334
}
336335

337-
338336
protected function getData($key = null)
339337
{
340338
if (!$this->data) {

0 commit comments

Comments
 (0)