mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Only set GridField state in request if a value is submitted
This commit is contained in:
parent
b5a83878dd
commit
8930304dfc
@ -670,7 +670,7 @@ class GridField extends FormField {
|
|||||||
$this->setDataModel($model);
|
$this->setDataModel($model);
|
||||||
|
|
||||||
$fieldData = $this->request->requestVar($this->getName());
|
$fieldData = $this->request->requestVar($this->getName());
|
||||||
if($fieldData && $fieldData['GridState']) $this->getState(false)->setValue($fieldData['GridState']);
|
if($fieldData && isset($fieldData['GridState'])) $this->getState(false)->setValue($fieldData['GridState']);
|
||||||
|
|
||||||
foreach($this->getComponents() as $component) {
|
foreach($this->getComponents() as $component) {
|
||||||
if(!($component instanceof GridField_URLHandler)) {
|
if(!($component instanceof GridField_URLHandler)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user