Skip to content

Commit

Permalink
Ensure fields isFresh is set for min rows, or static. Prevented aga…
Browse files Browse the repository at this point in the history
…inst dropdowns, etc having their default values set on-load
  • Loading branch information
engram-design committed Aug 18, 2018
1 parent 71fcc5e commit d7f713c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/fields/SuperTableField.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,12 @@ public function getInputHtml($value, ElementInterface $element = null): string
$block->fieldId = $this->id;
$block->typeId = $blockType->id;
$block->siteId = $element->siteId;

// Set each field to be fresh for auto-generated or static rows
foreach ($blockType->getFieldLayout()->getFields() as $field) {
$field->setIsFresh(true);
}

$value[] = $block;
}
}
Expand Down

0 comments on commit d7f713c

Please sign in to comment.