Skip to content

Commit

Permalink
FIX Fixes GridFieldEditableColumns::isChanged method for non-string v…
Browse files Browse the repository at this point in the history
…alues (e.g. arrays for has_many / many_many relations) (#343)

* fixes GridFieldEditableColumns::isChanged method for non-string values (e.g. arrays for has_many / many_many relations)

* revert formatting

Co-authored-by: Bumbus <[email protected]>
  • Loading branch information
bumbus and Bumbus authored Aug 1, 2022
1 parent 7f90426 commit f56bf67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GridFieldEditableColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ protected function getFieldName($name, GridField $grid, DataObjectInterface $rec
private function isChanged(DataObject $item, array $fields): bool
{
foreach ($fields as $name => $value) {
if ((string) $item->getField($name) !== (string) $value) {
if ($item->getField($name) !== $value) {
return true;
}
}
Expand Down

0 comments on commit f56bf67

Please sign in to comment.