diff --git a/forms/gridfield/GridField.php b/forms/gridfield/GridField.php index ca9fa7f618a..6ea7854b8bd 100644 --- a/forms/gridfield/GridField.php +++ b/forms/gridfield/GridField.php @@ -105,7 +105,12 @@ public function __construct($name, $title = null, SS_List $dataList = null, Grid $this->setConfig($config); - $this->config->addComponent(new GridState_Component()); + $state = $this->config->getComponentByType('GridState_Component'); + + if (!$state) { + $this->config->addComponent(new GridState_Component()); + } + $this->state = new GridState($this); $this->addExtraClass('ss-gridfield');