Skip to content

Commit

Permalink
FIX: use default values in new inline rows (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntd committed Mar 24, 2021
1 parent 74126ed commit 3d49864
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GridFieldAddNewInlineButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ private function getRowTemplate(GridField $grid, GridFieldEditableColumns $edita
$field->getName()
));

if ($record && $record->hasField($column)) {
$field->setValue($record->getField($column));
}
$content = $field->Field();
} else {
$content = $grid->getColumnContent($record, $column);
Expand Down

0 comments on commit 3d49864

Please sign in to comment.