mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #16645 from filamentphp/fix/get-grouped-enabled-options
fix: Get grouped enabled options
This commit is contained in:
@@ -32,7 +32,11 @@ trait CanDisableOptions
|
||||
return collect($this->getOptions())
|
||||
->reduce(function (Collection $carry, $label, $value): Collection {
|
||||
if (is_array($label)) {
|
||||
return $carry->merge($label);
|
||||
foreach ($label as $key => $value) {
|
||||
$carry->put($key, $value);
|
||||
}
|
||||
|
||||
return $carry;
|
||||
}
|
||||
|
||||
return $carry->put($value, $label);
|
||||
|
||||
Reference in New Issue
Block a user