Skip to content

Commit

Permalink
Update Column.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrombez authored Feb 19, 2024
1 parent 365248e commit a57edeb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Grid/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public function getValue(object|array $entity)
return $valueCallback($entity, $extra ?? []);
}

if ($this->value === null) {
return isset($extra) ? [$entity, $extra] : $entity;
}

try {
return (PropertyAccess::createPropertyAccessor())->getValue($entity, $this->value);
} catch (NoSuchPropertyException $e) {
Expand Down

0 comments on commit a57edeb

Please sign in to comment.