kop / yii2-scroll-pager

Infinite AJAX scrolling for Yii2 ListView widget
https://kop.github.io/yii2-scroll-pager/
MIT License
180 stars 63 forks source link

yii2-scroll-pager not working after pjax reload #91

Open byndstd opened 6 years ago

byndstd commented 6 years ago

I'm using scroll pager for my web ; and I'm using pjax for my form after I submit my form and reload my yii2 scroll pager it not working if I click on : load more items. when my content is submited and the listview is reloaded the Load more items not working

the is my code for my list view : <?php Pjax::begin(['id' => 'post-list']) ?> <?= ListView::widget([ 'dataProvider' => $dataProvider, 'summary'=>'', 'itemOptions' => ['class' => 'item'], // LY - FOR ( LOAD MORE ) 'itemView' => '/content/views/chnPosts', 'pager' => ['class' => ScrollPager::className(), 'enabledExtensions' => [ ScrollPager::EXTENSION_TRIGGER, ScrollPager::EXTENSION_SPINNER, ScrollPager::EXTENSION_NONE_LEFT, ScrollPager::EXTENSION_PAGING, ], ] ]); ?> <?php Pjax::end() ?>

and my form is : `

'pjax-glr']); ?> 'upload-gallery', 'options' => ['data-pjax' => true, 'enctype' => 'multipart/form-data']]) ?> field($model_PstGlr, 'PGalleryFile[]')->fileInput(['multiple' => true, 'accept' => 'image/*']) ?> field($model_PstGlr, 'post_text')->textarea(['rows' => 2]) ?> field($model_PstGlr, 'permission_id')->dropdownList($model_Permission->PermissionOn()) ?>
'btn btn-success']) ?>
`
nicdnepr commented 4 years ago

Did you solve it?