Permalink
Browse files

ENHANCEMENT SSF-25 : remove GridField filter component for search res…

…ult in ModelAdmin
  • Loading branch information...
1 parent d35d750 commit 2ea7c8d1360cfbdcbc0622aadc1a14d82821a76c @normann normann committed Mar 8, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 admin/code/ModelAdmin.php
@@ -708,15 +708,15 @@ function getResultsTable($searchCriteria) {
$className = $this->parentController->resultsTableClassName();
$datalist = $this->getSearchQuery($searchCriteria);
+ $numItemsPerPage = $this->parentController->stat('page_length');
$tf = Object::create($className,
$this->modelClass,
false,
$datalist,
- $fieldConfig = GridFieldConfig_RecordEditor::create()
- ->addComponent(new GridFieldExporter())
+ $fieldConfig = GridFieldConfig_RecordEditor::create($numItemsPerPage)
+ ->addComponent(new GridFieldExporter())->removeComponentsByType('GridFieldFilter')
)->setDisplayFields($this->getResultColumns($searchCriteria));
-
- $fieldConfig->getComponentByType('GridFieldPaginator')->setItemsPerPage($this->parentController->stat('page_length'));
+
return $tf;
}

0 comments on commit 2ea7c8d

Please sign in to comment.