Merge pull request #4778 from assertchris/prevent-multiple-states-added-to-single-config

Preventing multiple states added to single config
This commit is contained in:
Damian Mooyman 2015-11-17 13:23:09 +13:00
commit 37957b7ee8

View File

@ -105,7 +105,12 @@ class GridField extends FormField {
$this->setConfig($config);
$state = $this->config->getComponentByType('GridState_Component');
if (!$state) {
$this->config->addComponent(new GridState_Component());
}
$this->state = new GridState($this);
$this->addExtraClass('ss-gridfield');