We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b838df6 + 991753c commit 4fe9e6bCopy full SHA for 4fe9e6b
1 file changed
src/Controls/DependentSelectBox.php
@@ -102,16 +102,15 @@ private function tryLoadItems()
102
}
103
104
105
- if (count($items) > 0) {
106
- $this->loadHttpData();
+ $this->loadHttpData();
+ $this->setItems($items)
107
+ ->setPrompt($data->getPrompt() === null ? $this->getPrompt() : $data->getPrompt());
108
- $this->setItems($items)
109
- ->setPrompt($data->getPrompt() === null ? $this->getPrompt() : $data->getPrompt());
110
- } else {
+ if (count($items) === 0) {
111
if ($this->disabledWhenEmpty === true && !$this->isDisabled()) {
112
$this->setDisabled();
113
114
- }
+ }
115
116
117
0 commit comments