mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Fix issues with Spatie tags column state
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user