return $this->renderAjax('articlesearch', [
'dataProvider' => $dataProvider
]);
echo ListView::widget([
'dataProvider' => $dataProvider,
'options' => [
'tag' => false
],
'itemOptions' => [
'class' => 'item',
'tag' => false,
],
'emptyText' => 'Записей не найдено',
'summary' => false,
'itemView' => '_ajaxList',
'pager' => [
'class' => ScrollPager::className(),
'triggerText' => 'Еще',
'noneLeftText' => 'Записей нет',
'spinnerSrc' => '',
'spinnerTemplate' => '',
'enabledExtensions' => [
ScrollPager::EXTENSION_SPINNER,
ScrollPager::EXTENSION_NONE_LEFT,
ScrollPager::EXTENSION_PAGING
],
'eventOnScroll' => 'function() {console.log(1)}',
]
]);
'options' => [
'tag' => false
],
$script = <<< JS
var ias = jQuery.ias({
container: ".list-view",
item: ".item",
pagination: ".pagination",
next: ".next a"
});
ias.extension(new IASSpinnerExtension());
//ias.extension(new IASTriggerExtension({offset: 1}));
ias.extension(new IASNoneLeftExtension({text: "You reached the end"}));
JS;
$this->registerJs($script, yii\web\View::POS_READY);