Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

Commit

Permalink
Get through the plug-in configuration collapsed
Browse files Browse the repository at this point in the history
Get through the plug-in configuration collapsed
  • Loading branch information
pgyf committed Nov 26, 2015
1 parent c3cd811 commit 49755e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions TreeGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ class TreeGrid extends Widget {
* @see \yii\grid::$columns for details.
*/
public $columns = [];

public $collapsed = true;
/**
* Initializes the grid view.
* This method will initialize required property values and instantiate [[columns]] objects.
Expand Down Expand Up @@ -250,7 +248,7 @@ public function renderTableRow($model, $key, $index)

$parentId = ArrayHelper::getValue($model, $this->parentColumnName);
if ($parentId) {
if($this->collapsed){
if('collapsed' == ArrayHelper::getValue($this->pluginOptions, 'initialState')){
Html::addCssStyle($options, 'display: none;');
}
Html::addCssClass($options, "treegrid-parent-$parentId");
Expand Down

0 comments on commit 49755e8

Please sign in to comment.