diff --git a/src/Grid/Column.php b/src/Grid/Column.php index 5405552d9..ba0dd295e 100755 --- a/src/Grid/Column.php +++ b/src/Grid/Column.php @@ -537,7 +537,11 @@ public function fill($data) $this->original = Arr::get($this->originalModel, $this->name); - $this->value = $value = $this->htmlEntityEncode(Arr::get($row, $this->name)); + $this->value = $value = $this->htmlEntityEncode($original = Arr::get($row, $this->name)); + + if ($original === null) { + $original = (string) $original; + } $this->processConditions(); @@ -545,7 +549,9 @@ public function fill($data) $value = $this->callDisplayCallbacks($this->original); } - Helper::arraySet($row, $this->name, $value); + if ($original !== $value) { + Helper::arraySet($row, $this->name, $value); + } } $this->value = $value ?? null;