From 61b7ae7902767b0967588d34f69c45140d65aec9 Mon Sep 17 00:00:00 2001 From: Leandro Gehlen Date: Tue, 15 Mar 2016 08:25:40 -0300 Subject: [PATCH] Added info how to use provider --- README.md | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 57fea8f..bab72d0 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ class TreeController extends Controller $query = Tree::find(); $dataProvider = new ActiveDataProvider([ 'query' => $query, + 'pagination' => false ]); return $this->render('index', [ @@ -95,20 +96,20 @@ class TreeController extends Controller use leandrogehlen\treegrid\TreeGrid; $dataProvider, - 'keyColumnName' => 'id', - 'parentColumnName' => 'parent_id', - 'parentRootValue' => '0', //first parentId value - 'pluginOptions' => [ - 'initialState' => 'collapsed', - ], - 'columns' => [ - 'name', - 'id', - 'parent_id', - ['class' => 'yii\grid\ActionColumn'] - ] - ]); ?> + 'dataProvider' => $dataProvider, + 'keyColumnName' => 'id', + 'parentColumnName' => 'parent_id', + 'parentRootValue' => '0', //first parentId value + 'pluginOptions' => [ + 'initialState' => 'collapsed', + ], + 'columns' => [ + 'name', + 'id', + 'parent_id', + ['class' => 'yii\grid\ActionColumn'] + ] +]); ?> ```