diff --git a/src/DataGrid.php b/src/DataGrid.php index d9f8ed3e..bcc17a4b 100644 --- a/src/DataGrid.php +++ b/src/DataGrid.php @@ -1400,7 +1400,7 @@ public function createComponentFilter(): Form } if (!$this->hasAutoSubmit()) { - $filterContainer['submit'] = $this->getFilterSubmitButton(); + $filterContainer['submit'] = $this->getFilterSubmitButton()->setValidationScope([$filterContainer]); } /** diff --git a/src/Filter/SubmitButton.php b/src/Filter/SubmitButton.php index 72dce15f..d0fd9275 100644 --- a/src/Filter/SubmitButton.php +++ b/src/Filter/SubmitButton.php @@ -4,7 +4,6 @@ namespace Ublaboo\DataGrid\Filter; -use Nette\Forms\Controls\Button; use Nette\Utils\Html; use Ublaboo\DataGrid\DataGrid; use Ublaboo\DataGrid\Traits\TButtonClass; @@ -13,7 +12,7 @@ use Ublaboo\DataGrid\Traits\TButtonTitle; use Ublaboo\DataGrid\Traits\TButtonTryAddIcon; -class SubmitButton extends Button +class SubmitButton extends \Nette\Forms\Controls\SubmitButton { use TButtonTryAddIcon;