Dynamic pagesize on GridView

Hi, Can anyone make the example of Dynamic pagesize on GridView. I tried it several time but did not work. I also look at this thread but no luck,

TIA

Daniel

Hi @adinugro,

This widget may help you to create the dynamic pagesize on the grid view.

You can find demo configureation on that gist.
or you can just configure like this.

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'filterSelector' => 'select[name="per-page"]',
    'columns' => [
        ...
        [
            'class' => 'yii\grid\ActionColumn',
            'header' => \backend\widgets\PageSize::widget()
        ]
    ],
]); ?>