yiisoft / yii2-bootstrap4

Yii 2 Bootstrap 4 Extension
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
216 stars 106 forks source link

bootstrap pagination and disabled pjax #211

Closed srakl closed 3 years ago

srakl commented 3 years ago

I'm using Yii2 2.0.42.1. on my gridview i've changed to to POST and disabled pjax.

<?php Pjax::begin(['id'=>'id-pjax', 'timeout'=>false, 'enablePushState' => true, 'clientOptions' => ['type' => 'POST', 'url' => Url::to(['/test/default/dashboard'])]]); ?>

<?= GridView::widget([
                'dataProvider' => $dataProvider,
                'filterModel' => $searchModel,
                'filterPosition' => \yii\grid\GridView::FILTER_POS_HEADER,
                'pager' =>[
                    'linkOptions'=> ['data-pjax' => '0'],
                    'class' => \yii\bootstrap4\LinkPager::class,
                ],
                ....
]); ?>

<?php Pjax::end(); ?>

when i add 'linkOptions'=> ['data-pjax' => '0'], the pagination doesn't become bootstrap pagination, but the pagination works.

when i remove 'linkOptions'=> ['data-pjax' => '0'], the pagition UI is bootstrap, but pagination doesn't work at all

any idea how to fix this? I also have multiple gridviews on the same page.

bizley commented 3 years ago

Thank you for your question. In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.