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

Showing duplicate records

Open mohdbashir opened this issue 9 years ago • 2 comments

I am using the below code

$dataProvider, 'itemOptions' => ['class' => 'item'], 'itemView' => '_find_view', 'pager' => ['class' => \kop\y2sp\ScrollPager::className(), 'noneLeftText'=>'', 'triggerOffset'=>0, 'negativeMargin'=>1, ] ]); ?>

Once i removed the 'pager' block it works fine without duplicate row with pagination.

Search Model File: public function searchDeals($params) { $query = deal::find();
$dataProvider = new ActiveDataProvider([ 'query' => $query,
'pagination' => [ 'pageSize' => 3 , 'defaultPageSize'=> 0, 'validatePage' => TRUE, ], ]); $this->load($params);

    if (!$this->validate()) {
        // uncomment the following line if you do not want to any records when validation fails
        // $query->where('0=1');
        return $dataProvider;
    }

    $query->andFilterWhere([
        'status' => '1',
        'approved_status' => '1',           
        'discount' => $this->discount,      
    ]);
    return $dataProvider;
}

mohdbashir avatar Mar 24 '15 12:03 mohdbashir

Have the same issue, but it seems like you can fix it with a html "id" container workaround... look closed issues... never got it to work, so maybe there is a better way to solve it?

philippfrenzel avatar Mar 24 '15 12:03 philippfrenzel

_find_view.php

Style.css #right-sidebar { float: right; margin: 12px 0 0 20px; width: 77.7%; }

#right-sidebar span { display: block; float: left; margin: 0 4px; } #right-sidebar span a { border-bottom:1px solid #000; }

Can u please advise me where i am doing mistake that's why result is coming duplicates?

mohdbashir avatar Mar 25 '15 05:03 mohdbashir