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

"Load more items" button works only 1 time #76

Open niksib opened 7 years ago

niksib commented 7 years ago

image Dont show "Load more" button in ListView image

view file

<div class="categories-index">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('Create Categories', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= ListView::widget([
        'dataProvider' => $dataProvider,
        'itemOptions' => ['class' => 'item'],
        'itemView' => '_item_view',
        'pager' => ['class' => \kop\y2sp\ScrollPager::className()]
    ]); ?>

</div>

Controller

public function actionIndex($teamId)
    {
        $team = new Team();
        if($team->isOwner($teamId)) {
            $dataProvider = new ActiveDataProvider([
                'query' => Categories::find()->where(['team_id' => $teamId]),
                'pagination' => [
                    'pageSize' => 5,
                ]
            ]);
            return $this->render('index', [
                'dataProvider' => $dataProvider,
            ]);
        }else{
            Yii::$app->session->setFlash('error', 'У вас нет прав для просмотра даной страницы.');
            return $this->redirect(['/team']);
        }
    }
martrix78 commented 7 years ago

Та же самая ерунда. Один раз срабатывает и пропадает :(

crimson-med commented 6 years ago

I have the same problem here when using a listview

diana-frontdev commented 5 years ago

I have the same issue. Any fix?

crimson-med commented 5 years ago

No I haven't found any fixes I just load a lot of data straight

On Tue, 30 Oct 2018, 21:38 Diana, notifications@github.com wrote:

I have the same issue. Any fix?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kop/yii2-scroll-pager/issues/76#issuecomment-434303339, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa-t8oWRrSyECzl3AHf2H_ZKN7gFX-e6ks5uqFZLgaJpZM4KOw0D .

desenvolvedorindie commented 4 years ago

'overflowContainer' => '.element',

Element that lib should consider to check scroll