Fix issues with Spatie tags column state

This commit is contained in:
Dan Harrin
2025-04-07 11:55:05 +01:00
parent 9b454a885f
commit 4485a8146d
2 changed files with 7 additions and 7 deletions
@@ -28,13 +28,13 @@ class SpatieTagsColumn extends TextColumn
*/
public function getState(): array
{
$state = parent::getState();
if ($state && (! $state instanceof Collection)) {
return $state;
}
return $this->cacheState(function (): array {
$state = parent::getState();
if ($state && (! $state instanceof Collection)) {
return $state;
}
$record = $this->getRecord();
if ($this->hasRelationship($record)) {
@@ -305,7 +305,7 @@ trait HasCellState
$record = $this->getRecord();
if (! $record) {
return $state();
return null;
}
$recordKey = (string) $record->getKey();