Reset pagination on filter scope change (#3632)
Fixes #3610. Credit to @stevemortimer
This commit is contained in:
parent
157b08202b
commit
5936107c07
|
|
@ -239,7 +239,7 @@ class ListController extends ControllerBehavior
|
||||||
* Filter the list when the scopes are changed
|
* Filter the list when the scopes are changed
|
||||||
*/
|
*/
|
||||||
$filterWidget->bindEvent('filter.update', function () use ($widget, $filterWidget) {
|
$filterWidget->bindEvent('filter.update', function () use ($widget, $filterWidget) {
|
||||||
return $widget->onRefresh();
|
return $widget->onFilter();
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,15 @@ class Lists extends WidgetBase
|
||||||
return $this->onRefresh();
|
return $this->onRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler for changing the filter
|
||||||
|
*/
|
||||||
|
public function onFilter()
|
||||||
|
{
|
||||||
|
$this->currentPageNumber = 1;
|
||||||
|
return $this->onRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the supplied form model.
|
* Validate the supplied form model.
|
||||||
* @return void
|
* @return void
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue