Skip to content

Commit

Permalink
BUGFIX: Fix where filter appears
Browse files Browse the repository at this point in the history
Make filter only appear in GridFields that include the
GridFieldFilterHeader component
  • Loading branch information
adrexia committed May 16, 2012
1 parent 458171f commit 6c8dbe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forms/gridfield/GridFieldSortableHeader.php
Expand Up @@ -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>');
Expand Down

0 comments on commit 6c8dbe1

Please sign in to comment.