mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Update CanFormatState.php
This commit is contained in:
@@ -137,13 +137,7 @@ trait CanFormatState
|
||||
|
||||
public function getFormattedState()
|
||||
{
|
||||
$state = $this->getState();
|
||||
|
||||
if ($this->formatStateUsing) {
|
||||
$state = $this->evaluate($this->formatStateUsing, [
|
||||
'state' => $state,
|
||||
]);
|
||||
}
|
||||
$state = $this->evaluate($this->formatStateUsing ?? fn ($state) => $state);
|
||||
|
||||
if ($this->prefix) {
|
||||
$state = $this->evaluate($this->prefix) . $state;
|
||||
|
||||
Reference in New Issue
Block a user