Merge pull request #313 from creative-commoners/pulls/3.2/column-content-fallback

FIX Reinstate previous field fetch logic as fallback
This commit is contained in:
Garion Herman 2020-07-30 16:46:06 +12:00 committed by GitHub
commit c77d9d1de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,12 @@ class GridFieldEditableColumns extends GridFieldDataColumns implements
$value = $grid->getDataFieldValue($record, $col);
$field = $fields->dataFieldByName($col);
// Fall back to previous logic
if (!$field) {
$rel = (strpos($col, '.') === false); // field references a relation value
$field = ($rel) ? clone $fields->fieldByName($col) : new ReadonlyField($col);
}
if (!$field) {
throw new Exception("Could not find the field '$col'");
}