Adds a constraint of 500 records at a time

Example given with 5000 records cripples the filter, this cap will keep it usable until we develop a better solution.
Refs #3202
This commit is contained in:
Samuel Georges 2017-11-23 07:27:08 +11:00
parent 15314bbe94
commit 0b68668d14
1 changed files with 7 additions and 0 deletions

View File

@ -370,8 +370,15 @@ class Filter extends WidgetBase
protected function getOptionsFromModel($scope, $searchQuery = null)
{
$model = $this->scopeModels[$scope->scopeName];
$query = $model->newQuery();
/*
* The 'group' scope has trouble supporting more than 500 records at a time
* @todo Introduce a more advanced version with robust list support.
*/
$query->limit(500);
/*
* Extensibility
*/