Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 2c644ae

Browse files
committed
Correct enum support
1 parent 2904919 commit 2c644ae

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Components/FormSelect.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ public function __construct(
5555
$this->selectedKey = $this->selectedKey->toArray();
5656
}
5757

58-
if ($this->selectedKey instanceof \UnitEnum) {
58+
if ($this->selectedKey instanceof \BackedEnum) {
5959
$this->selectedKey = $this->selectedKey->value;
6060
}
61+
62+
if ($this->selectedKey instanceof \UnitEnum) {
63+
$this->selectedKey = $this->selectedKey->name;
64+
}
6165
}
6266

6367
$this->multiple = $multiple;

0 commit comments

Comments
 (0)