From bcb8c55270fe837ec4512a74f4d283eebc6bc902 Mon Sep 17 00:00:00 2001 From: liyunfang <381296986@qq.com> Date: Thu, 26 Nov 2015 16:20:35 +0800 Subject: [PATCH] Update README.md --- README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b881382..48c2f7b 100644 --- a/README.md +++ b/README.md @@ -93,16 +93,21 @@ class TreeController extends Controller ```php use leandrogehlen\treegrid\TreeGrid; - $dataProvider, - 'keyColumnName' => 'id', - 'parentColumnName' => 'parent_id', - 'columns' => [ - 'id', - 'description', - ['class' => 'yii\grid\ActionColumn'] - ] - ]); ?> + $dataProvider, + 'keyColumnName' => 'id', + 'parentColumnName' => 'parent_id', + 'parentRoot' => '0', //first parentId value + 'pluginOptions' => [ + 'initialState' => 'collapsed', + ], + 'columns' => [ + 'name', + 'id', + 'parent_id', + ['class' => 'yii\grid\ActionColumn'] + ] + ]); ?> ```