RecordFinder can specify number of records per page
Fixes #2082 Fix spacing on composer.json
This commit is contained in:
parent
e2f30cb8a4
commit
536a4b382c
|
|
@ -62,6 +62,6 @@
|
|||
"recurse": true,
|
||||
"replace": false,
|
||||
"merge-dev": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,11 @@ class RecordFinder extends FormWidgetBase
|
|||
*/
|
||||
public $prompt = 'Click the %s button to find a record';
|
||||
|
||||
/**
|
||||
* @var int Maximum rows to display for each page.
|
||||
*/
|
||||
public $recordsPerPage = 10;
|
||||
|
||||
/**
|
||||
* @var string Use a custom scope method for the list query.
|
||||
*/
|
||||
|
|
@ -115,6 +120,7 @@ class RecordFinder extends FormWidgetBase
|
|||
'conditions',
|
||||
'searchMode',
|
||||
'searchScope',
|
||||
'recordsPerPage',
|
||||
]);
|
||||
|
||||
if (post('recordfinder_flag')) {
|
||||
|
|
@ -241,7 +247,7 @@ class RecordFinder extends FormWidgetBase
|
|||
$config->alias = $this->alias . 'List';
|
||||
$config->showSetup = false;
|
||||
$config->showCheckboxes = false;
|
||||
$config->recordsPerPage = 10;
|
||||
$config->recordsPerPage = $this->recordsPerPage;
|
||||
$config->recordOnClick = sprintf("$('#%s').recordFinder('updateRecord', this, ':" . $this->keyFrom . "')", $this->getId());
|
||||
$widget = $this->makeWidget('Backend\Widgets\Lists', $config);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue