- Fixed conflict
This commit is contained in:
1 parent
bf7605eef6
commit
e2c1c7ac39
3 files changed
+34
-44
No files matched your search
@@ -40,6 +40,7 @@ class UiSelect extends UiElement implements Extension {
|
||||
foreach($list as $key => $item) {
|
||||
if ($item instanceof UiElement) {
|
||||
$this->append($item);
|
||||
|
||||
continue;
|
||||
}
|
||||
elseif ( is_array($item) ) {
|
||||
@@ -53,7 +54,7 @@ class UiSelect extends UiElement implements Extension {
|
||||
else {
|
||||
$obj = $this->createOption($item, $key, $strict ? $key === $selected : $key == $selected);
|
||||
}
|
||||
|
||||
|
||||
$this->append($obj);
|
||||
}
|
||||
}
|
||||
@@ -64,6 +65,10 @@ class UiSelect extends UiElement implements Extension {
|
||||
$option->text($name);
|
||||
$option->attributes($attributes + [ 'value' => $value ]);
|
||||
|
||||
if ($selected) {
|
||||
$option->attributes(['selected' => 'selected']);
|
||||
}
|
||||
|
||||
return $option;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user