Skip to content

Commit

Permalink
Merge pull request #10736 from creative-commoners/pulls/pulls/5.0/dou…
Browse files Browse the repository at this point in the history
…ble-sort/pulls/5.0/double-filter

FIX Remove legacy filter icon
  • Loading branch information
GuySartorelli committed Mar 28, 2023
2 parents 62f6177 + 84273b8 commit d30cd6f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/Forms/GridField/GridFieldSortableHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,25 +188,7 @@ public function getHTMLFragments($gridField)
}
}
} else {
if ($currentColumn == count($columns ?? [])) {
$filter = $gridField->getConfig()->getComponentByType(GridFieldFilterHeader::class);

if ($filter && $filter->canFilterAnyColumns($gridField)) {
$field = new LiteralField(
$fieldName,
sprintf(
'<button type="button" name="showFilter" aria-label="%s" title="%s"' .
' class="btn btn-secondary font-icon-search btn--no-text btn--icon-large grid-field__filter-open"></button>',
_t('SilverStripe\\Forms\\GridField\\GridField.OpenFilter', "Open search and filter"),
_t('SilverStripe\\Forms\\GridField\\GridField.OpenFilter', "Open search and filter")
)
);
} else {
$field = new LiteralField($fieldName, '<span class="non-sortable">' . $title . '</span>');
}
} else {
$field = new LiteralField($fieldName, '<span class="non-sortable">' . $title . '</span>');
}
$field = new LiteralField($fieldName, '<span class="non-sortable">' . $title . '</span>');
}
$forTemplate->Fields->push($field);
}
Expand Down

0 comments on commit d30cd6f

Please sign in to comment.