Compare commits
2 Commits
95c30be9f8
...
6020fa300d
Author | SHA1 | Date | |
---|---|---|---|
6020fa300d | |||
7437bbfc73 |
@ -38,7 +38,6 @@ class UiSelect extends UiElement implements Extension {
|
||||
protected function setList(array $list, $selected, bool $strict = true) : void
|
||||
{
|
||||
foreach($list as $key => $item) {
|
||||
|
||||
if ($item instanceof UiElement) {
|
||||
$this->append($item);
|
||||
|
||||
@ -49,13 +48,13 @@ class UiSelect extends UiElement implements Extension {
|
||||
$obj->attributes(['label' => $key]);
|
||||
|
||||
foreach($item as $subKey => $subItem) {
|
||||
$obj->append($this->createOption($subItem, $subKey, $this->isSelected($subKey, $selected, $strict)));
|
||||
$obj->append($this->createOption((string) $subItem, $subKey, $this->isSelected($subKey, $selected, $strict)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$obj = $this->createOption($item, $key, $this->isSelected($key, $selected, $strict));
|
||||
$obj = $this->createOption((string) $item, $key, $this->isSelected($key, $selected, $strict));
|
||||
}
|
||||
|
||||
|
||||
$this->append($obj);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user