Skip to content

Commit

Permalink
fixed optionLabel override issue - #1679 (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
YashShah20 authored Sep 17, 2024
1 parent c9a575f commit 36fa962
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/Filters/FilterEnumSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function dataSource(Collection|array $enumCases): FilterEnumSelect

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

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

0 comments on commit 36fa962

Please sign in to comment.