Merge pull request #319 from ntd/inline-row-with-defaults

FIX: use default values in new inline rows (#64)
This commit is contained in:
Marcus 2021-05-13 10:11:36 +10:00 committed by GitHub
commit 7738a0b89b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,6 +135,9 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S
$field->getName()
));
if ($record && $record->hasField($column)) {
$field->setValue($record->getField($column));
}
$content = $field->Field();
} else {
$content = $grid->getColumnContent($record, $column);