Browse files

BUGFIX: Fix where filter appears

Make filter only appear in GridFields that include the
GridFieldFilterHeader component
  • Loading branch information...
1 parent 458171f commit 6c8dbe1a565e46bd3efada3e44a10cc066ab1011 @adrexia adrexia committed May 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/gridfield/GridFieldSortableHeader.php
View
2 forms/gridfield/GridFieldSortableHeader.php
@@ -85,7 +85,7 @@ public function getHTMLFragments($gridField) {
$field->addExtraClass('ss-gridfield-sorted-desc');
}
} else {
- if($currentColumn == count($columns)){
+ if($currentColumn == count($columns) && $gridField->getConfig()->getComponentByType('GridFieldFilterHeader')){
$field = new LiteralField($columnField, '<button name="showFilter" class="ss-gridfield-button-filter" id="showFilter"></button>');
}else{
$field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');

0 comments on commit 6c8dbe1

Please sign in to comment.