Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Oct 30, 2024
1 parent bf678e3 commit 29e03ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Fields/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use Cone\Root\Traits\HasAttributes;
use Cone\Root\Traits\Makeable;
use function Illuminate\Support\enum_value;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Traits\Conditionable;

use JsonSerializable;

class Option implements Arrayable, JsonSerializable
Expand All @@ -25,7 +27,7 @@ class Option implements Arrayable, JsonSerializable
public function __construct(mixed $value, string $label)
{
$this->label = $label;
$this->setAttribute('value', $value);
$this->setAttribute('value', enum_value($value));
$this->selected(false);
}

Expand Down

0 comments on commit 29e03ed

Please sign in to comment.