mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
cast recordKey to string
This commit is contained in:
@@ -82,8 +82,9 @@ trait HasCellState
|
||||
return null;
|
||||
}
|
||||
|
||||
if (array_key_exists($record->getKey(), $this->cachedState)) {
|
||||
return $this->cachedState[$record->getKey()];
|
||||
$recordKey = (string) $record->getKey();
|
||||
if (array_key_exists($recordKey, $this->cachedState)) {
|
||||
return $this->cachedState[$recordKey];
|
||||
}
|
||||
|
||||
$state = ($this->getStateUsing !== null) ?
|
||||
@@ -101,7 +102,7 @@ trait HasCellState
|
||||
$state = $this->getDefaultState();
|
||||
}
|
||||
|
||||
return $this->cachedState[$record->getKey()] = $state;
|
||||
return $this->cachedState[$recordKey] = $state;
|
||||
}
|
||||
|
||||
public function getStateFromRecord(): mixed
|
||||
|
||||
Reference in New Issue
Block a user