Skip to content

Commit 65f6450

Browse files
committed
fixed MultiChoiceControl::setDisabled
1 parent d2ed7c9 commit 65f6450

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Form/TAjaxSelect.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ private function initiateItems($value = null): void
138138
$value = $value ?? $this->value;
139139
$data = [];
140140

141+
if ($this instanceof \Nette\Forms\Controls\MultiChoiceControl) {
142+
$this->value ??= [];
143+
}
144+
141145
if (\in_array($value, [null, '', []], true)) {
142146
if (\count($this->items) > 0) {
143147
return;

0 commit comments

Comments
 (0)