mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #14998 from aSeriousDeveloper/text-column-array-support
fix: allow text-columns to read a nested array value
This commit is contained in:
@@ -43,7 +43,17 @@
|
||||
$arrayState = implode(
|
||||
', ',
|
||||
array_map(
|
||||
fn ($value) => $value instanceof \Filament\Support\Contracts\HasLabel ? $value->getLabel() : $value,
|
||||
function ($value) {
|
||||
if ($value instanceof \Filament\Support\Contracts\HasLabel) {
|
||||
return $value->getLabel();
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
return json_encode($value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
},
|
||||
$arrayState,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user