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

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pgyf committed Nov 26, 2015
1 parent 5aabbeb commit bcb8c55
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,21 @@ class TreeController extends Controller
```php
use leandrogehlen\treegrid\TreeGrid;

<?= TreeGrid::widget([
'dataProvider' => $dataProvider,
'keyColumnName' => 'id',
'parentColumnName' => 'parent_id',
'columns' => [
'id',
'description',
['class' => 'yii\grid\ActionColumn']
]
]); ?>
<?= TreeGrid::widget([
'dataProvider' => $dataProvider,
'keyColumnName' => 'id',
'parentColumnName' => 'parent_id',
'parentRoot' => '0', //first parentId value
'pluginOptions' => [
'initialState' => 'collapsed',
],
'columns' => [
'name',
'id',
'parent_id',
['class' => 'yii\grid\ActionColumn']
]
]); ?>
```


0 comments on commit bcb8c55

Please sign in to comment.