Skip to content

Commit

Permalink
validation scope filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorius committed Dec 21, 2021
1 parent aaf6afd commit 308ecd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ public function createComponentFilter(): Form
}

if (!$this->hasAutoSubmit()) {
$filterContainer['submit'] = $this->getFilterSubmitButton();
$filterContainer['submit'] = $this->getFilterSubmitButton()->setValidationScope([$filterContainer]);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/Filter/SubmitButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 308ecd1

Please sign in to comment.