Skip to content

Commit

Permalink
Merge pull request #883 from tractorcow-farm/7.1
Browse files Browse the repository at this point in the history
Merge branch '7.1' into 7
  • Loading branch information
emteknetnz authored Sep 1, 2024
2 parents f594871 + dc85ba9 commit 29f5634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Extension/Traits/FluentObjectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use SilverStripe\Forms\GridField\GridFieldConfig;
use SilverStripe\Forms\GridField\GridFieldConfig_Base;
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Forms\GridField\GridFieldFilterHeader;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataQuery;
Expand Down Expand Up @@ -106,6 +107,8 @@ protected function updateFluentCMSFields(FieldList $fields)

// Generate gridfield for handling localisations
$config = GridFieldConfig_Base::create();
// Remove filters as the displayed data is in ArrayList format
$config->removeComponentsByType(GridFieldFilterHeader::class);

$columns = $config->getComponentByType(GridFieldDataColumns::class);
$summaryColumns = [
Expand Down
2 changes: 2 additions & 0 deletions tests/php/Extension/FluentFilteredExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use SilverStripe\Core\Config\Config;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldFilterHeader;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use TractorCow\Fluent\Extension\FluentFilteredExtension;
Expand Down Expand Up @@ -151,6 +152,7 @@ public function testUpdateCMSFields()
LocaleToggleColumn::class,
$config->getComponentByType(LocaleToggleColumn::class)
);
$this->assertNull($config->getComponentByType(GridFieldFilterHeader::class));
});
}

Expand Down

0 comments on commit 29f5634

Please sign in to comment.