yii2-scroll-pager icon indicating copy to clipboard operation
yii2-scroll-pager copied to clipboard

Getting TypeError: this.list[i].fn is undefined on ajax load

Open PrajapatiDhara1510 opened this issue 9 years ago • 0 comments

This is my code

Pjax::begin(['id' => 'property-list', 'linkSelector' => false, 'timeout' => false, 'enablePushState' => true]); 
ListView::widget([
    'dataProvider' => $dataProvider,
    'id' => 'proprtyData',
    'layout' => "{items}{pager}",
    'itemView' => '_view',
    'itemOptions' => ['class' => 'item'],
    // 'beforeAjaxUpdate'=>"function(id,data){ $('#loader').show();}",
    'pager' => ['class' => ScrollPager::className(),
                    'enabledExtensions' => [
                ScrollPager::EXTENSION_TRIGGER,
                ScrollPager::EXTENSION_SPINNER,
                ScrollPager::EXTENSION_NONE_LEFT,
                ScrollPager::EXTENSION_PAGING,
            ],
        'noneLeftTemplate' => '<div class="clearfix"></div><div class="ias-noneleft" style="text-align: center;">No More Results Found</div>',
        'eventOnScroll' => TRUE,
        'triggerTemplate' => '<div class="ias-trigger" style="text-align: center; cursor: pointer;"><a>{text}</a></div>',
        'overflowContainer' => NULL,
        'triggerOffset' => 500]
]);
 Pjax::end();

When i scroll page, data loaded by ajax. At First ajax load data loaded successfully. But when i scroll again i face TypeError: this.list[i].fn is undefined error in console. so it cant load all data.

And one thing more. when i came first time it automatically load all data without scroll. what is wrong with it?

PrajapatiDhara1510 avatar May 17 '16 05:05 PrajapatiDhara1510