Merge pull request #16645 from filamentphp/fix/get-grouped-enabled-options

fix: Get grouped enabled options
This commit is contained in:
Dan Harrin
2025-06-22 17:56:50 +01:00
committed by GitHub
@@ -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);