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

Issue with pjax and filters #104

Open ExpandXSoln opened 4 years ago

ExpandXSoln commented 4 years ago

When the scroll happens, for the next set of rows fetched, the filters applied are not getting honored. Any fixes available for this?

ExpandXSoln commented 4 years ago

to give more details, my URL has something like /dispatch-index?oa_number=&status=&DispatchOaTypeSearch%5Boadetails_ld_date%5D=&oa_type=&DispatchOaTypeSearch%5Bproduct_line_id%5D=&DispatchOaTypeSearch%5Bcust_id%5D=TRF&DispatchOaTypeSearch%5Bcust_po_number%5D=&DispatchOaTypeSearch%5Bcust_po_date%5D=&DispatchOaTypeSearch%5Bdelivery_date%5D=&DispatchOaTypeSearch%5Bgrand_total%5D=&DispatchOaTypeSearch%5Bprepared_by%5D=&DispatchOaTypeSearch%5Bcreated_on%5D=&sales_target_year=2019-20

As filter parameters, now when infinite scroll happens, the trigger link goes like /dispatch-index?sales_target_year=2019-20&page=2&per-page=10

Because the URL is changes, the filter params are not retained in it the results fetched are different.

How to retain the origin URL parameters?