Open karamdeep-singh opened 7 years ago
I have the same problem! Anyone help?
The same with me, anybody can help us to resolve this ticket?
Here is my code:
<?= ListView::widget([
'dataProvider' => $dataProvider,
'itemOptions' => ['class' => 'item'],
'itemView' => '_view_category',
'summary' => '',
'pager' => [
'class' => \kop\y2sp\ScrollPager::className(),
'triggerText' => 'Load more new items',
'eventOnRendered' => 'function() {window.setTimeout(function() {$(window).scroll();}, 500);}',
'triggerOffset' => 1,
'enabledExtensions' => [
\kop\y2sp\ScrollPager::EXTENSION_TRIGGER,
\kop\y2sp\ScrollPager::EXTENSION_SPINNER,
\kop\y2sp\ScrollPager::EXTENSION_NONE_LEFT,
\kop\y2sp\ScrollPager::EXTENSION_PAGING,
]
]
]);
?>
Many thanks.
Jason Hai.
<?php
echo \yii\widgets\ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_item',
'pager' => [
'class' => \kop\y2sp\ScrollPager::className(),
'triggerOffset'=>10000000,
'enabledExtensions' => ['EXTENSION_HISTORY' => false],
]
]);
?>
set 'enabledExtensions'=> ['IASSpinnerExtension'],
'triggerOffset'=>$dataProvider->totalCount/$dataProvider->pagination->pageSize,
this should be closed as the comment from @patpwilly explains the logic
I have set the triggerOffset 3 , but i need a every scroll on record without click on "load more items"
pls help