From 6e67eebfe7f58fc5df52f9757965b1e926f8d3a8 Mon Sep 17 00:00:00 2001 From: jqh <841324345@qq.com> Date: Wed, 23 Dec 2020 11:10:57 +0800 Subject: [PATCH] wip --- src/Grid/Column.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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;