Merge branch '3.6' into 3

This commit is contained in:
Daniel Hensby 2017-07-25 16:03:35 +01:00
commit 4ca96eae48
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,7 @@
language: php language: php
dist: precise
sudo: false sudo: false
addons: addons:

View File

@ -104,8 +104,6 @@ class GridField extends FormField {
} }
$this->setConfig($config); $this->setConfig($config);
$this->config->addComponent(new GridState_Component());
$this->state = new GridState($this); $this->state = new GridState($this);
$this->addExtraClass('ss-gridfield'); $this->addExtraClass('ss-gridfield');
@ -177,6 +175,10 @@ class GridField extends FormField {
public function setConfig(GridFieldConfig $config) { public function setConfig(GridFieldConfig $config) {
$this->config = $config; $this->config = $config;
if (!$this->config->getComponentByType('GridState_Component')) {
$this->config->addComponent(new GridState_Component());
}
return $this; return $this;
} }