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

Commit cda3fce

Browse files
Add support for Enum as selected item in FormSelect
1 parent d4bf426 commit cda3fce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Components/FormSelect.php

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function __construct(
5454
if ($this->selectedKey instanceof Arrayable) {
5555
$this->selectedKey = $this->selectedKey->toArray();
5656
}
57+
58+
if ($this->selectedKey instanceof \UnitEnum) {
59+
$this->selectedKey = $this->selectedKey->value;
60+
}
5761
}
5862

5963
$this->multiple = $multiple;

0 commit comments

Comments
 (0)