diff --git a/src/DependentSelectBox/DependentSelectBox.php b/src/DependentSelectBox/DependentSelectBox.php index 12f3b3e..1e352b3 100644 --- a/src/DependentSelectBox/DependentSelectBox.php +++ b/src/DependentSelectBox/DependentSelectBox.php @@ -123,6 +123,7 @@ public function setValue($value, $refreshTree = true) { if($value !== null && !$this->hasEmptyValue() && $this->hasAnyParentEmptyValue()) { throw new LogicException("Cant set value of dependent component when parent have no value ! (Control: '$this->name')"); } + if($value != '') parent::setValue($value); if($refreshTree && !$this->hasEmptyValue()) $this->refresh(false);