diff --git a/TreeGrid.php b/TreeGrid.php index 69b5e33..52f57ae 100644 --- a/TreeGrid.php +++ b/TreeGrid.php @@ -247,7 +247,7 @@ public function renderTableRow($model, $key, $index) Html::addCssClass($options, "treegrid-$id"); $parentId = ArrayHelper::getValue($model, $this->parentColumnName); - if ($parentId) { + if ($parentId && $parentId != $this->parentRootValue) { if(ArrayHelper::getValue($this->pluginOptions, 'initialState') == 'collapsed'){ Html::addCssStyle($options, 'display: none;'); }