Skip to content

Commit

Permalink
fix #869
Browse files Browse the repository at this point in the history
  • Loading branch information
jqhph committed Dec 23, 2020
1 parent 6e67eeb commit f683105
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Grid/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public function fill($data)
{
$i = 0;

foreach ($data as $key => $row) {
$data->transform(function ($row, $key) use (&$i) {
$i++;
if (! isset($row['#'])) {
$row['#'] = $i;
Expand All @@ -552,9 +552,11 @@ public function fill($data)
if ($original !== $value) {
Helper::arraySet($row, $this->name, $value);
}
}

$this->value = $value ?? null;
$this->value = $value ?? null;

return $row;
});
}

/**
Expand Down

0 comments on commit f683105

Please sign in to comment.