Skip to content

Commit

Permalink
ProductHolder - Products GridField cleanup (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirish authored Oct 3, 2018
1 parent 35f0952 commit 3c13126
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/pages/ProductHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ public function getCMSFields()
if (class_exists('GridFieldSortableRows')) {
$config->addComponent(new GridFieldSortableRows('SortOrder'));
}
if (class_exists('GridFieldManyRelationHandler')) {
if (class_exists('GridFieldAddExistingSearchButton')) {
$config->removeComponentsByType('GridFieldAddExistingAutocompleter');
$config->addComponent(new GridFieldManyRelationHandler());
$config->addComponent(new GridFieldAddExistingSearchButton());
}
$config->removeComponentsByType('GridFieldAddNewButton');
$fields->addFieldToTab(
'Root.Products',
GridField::create(
Expand Down

0 comments on commit 3c13126

Please sign in to comment.