Trim ModelAdmin SearchForm values

This commit is contained in:
Oliver Shaw 2015-02-08 19:25:51 +13:00 committed by Will Rossiter
parent 5f31983ded
commit 7484b4f5d9

View File

@ -210,6 +210,11 @@ abstract class ModelAdmin extends LeftAndMain {
public function getList() {
$context = $this->getSearchContext();
$params = $this->request->requestVar('q');
if(is_array($params)) {
$params = array_map('trim', $params);
}
$list = $context->getResults($params);
$this->extend('updateList', $list);