Skip to content

Commit 36fa962

Browse files
authored
fixed optionLabel override issue - #1679 (#1681)
1 parent c9a575f commit 36fa962

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Components/Filters/FilterEnumSelect.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public function dataSource(Collection|array $enumCases): FilterEnumSelect
2323

2424
public function execute(): FilterEnumSelect
2525
{
26-
$optionLabel = 'value';
26+
// use previously set optionLabel is set by the user
27+
$optionLabel = $this->optionLabel ?? 'value';
2728

2829
$collection = collect($this->dataSource)->map(function ($case) use (&$optionLabel) {
2930
$option = (array) $case;

0 commit comments

Comments
 (0)