Open GuySartorelli opened 2 years ago
I think the solution here would be to change GridFieldFilterHeader
to not check for filterable columns unless the legacy functionality is used, i.e. change:
to:
public function getHTMLFragments($gridField)
{
$forTemplate = new ArrayData([]);
if ($this->useLegacyFilterHeader) {
if (!$this->canFilterAnyColumns($gridField)) {
return null;
}
$fieldsList = $this->getLegacyFilterHeader($gridField);
Not sure, but fixing https://github.com/silverstripe/silverstripe-admin/issues/1350 will probably fix this issue.
This is no longer a problem for CMS 5 - but it remains a bug for CMS 4.
There is no search filter in the Groups tab in
SecurityAdmin
despite having theGridFieldFilterHeader
in the groupsGridFieldConfig
. What's more, if you customise thesummary_fields
orsearchable_fields
forGroup
via anExtension
, theSecurityAdmin
doesn't respect it.This seems to be caused by the below lines which override the display fields for
GridFieldDataColumns
. https://github.com/silverstripe/silverstripe-admin/blob/7f7fc721cb3820487acefa6e1663c252d9d56cc5/code/SecurityAdmin.php#L143-L145 Commenting out those lines provides the search filter and allows customisedsummary_fields
orsearchable_fields
to be reflected correctly.It also points out a deeper issue - the
GridFieldFilterHeader
should probably not be affected byGridFieldDataColumns
ifsearchable_fields
has been provided.