yii2-scroll-pager
yii2-scroll-pager copied to clipboard
Showing duplicate records
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;
}
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?
_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?