Skip to content

Commit

Permalink
CompatController: Automatically apply default list control layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Oct 17, 2022
1 parent 2370a7c commit e58a61e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Compat/CompatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ protected function addControl(ValidHtml $control)
{
$this->controls->add($control);

if (
$control instanceof PaginationControl
|| $control instanceof LimitControl
|| $control instanceof SortControl
|| $control instanceof SearchBar
) {
$this->controls->getAttributes()
->get('class')
->removeValue('default-layout')
->addValue('default-layout');
}

return $this;
}

Expand Down

0 comments on commit e58a61e

Please sign in to comment.