diff --git a/TreeGrid.php b/TreeGrid.php index c53e005..55295f4 100644 --- a/TreeGrid.php +++ b/TreeGrid.php @@ -248,7 +248,7 @@ public function renderTableRow($model, $key, $index) $parentId = ArrayHelper::getValue($model, $this->parentColumnName); if ($parentId) { - if('collapsed' == ArrayHelper::getValue($this->pluginOptions, 'initialState')){ + if(ArrayHelper::getValue($this->pluginOptions, 'initialState') == 'collapsed'){ Html::addCssStyle($options, 'display: none;'); } Html::addCssClass($options, "treegrid-parent-$parentId");