awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.17k stars 1.04k forks source link

Bug with endless scrolling when there are has offset #859

Open execut opened 3 years ago

execut commented 3 years ago

Steps to reproduce:

  1. Go to catalog list with auto pagination
  2. Add any ?offset=1 to url
  3. Scrolling down is endless
execut commented 3 years ago

The situation repeats with zero offset. Disabling auto-pagination as if it was more than zero does not help here. It is necessary to refine the javascript to fix the error. I'll fix this error today

execut commented 3 years ago

Complete

execut commented 3 years ago

I have a question. Why use rest_framework.pagination.LimitOffsetPagination pagination in ProductListPagination? The rest_framework.pagination.PageNumberPagination would do this nice for it work. And would not entail such a mistake. What is the reason for this?

jrief commented 3 years ago

Why use rest_framework.pagination.LimitOffsetPagination pagination in ProductListPagination?

Because unless you use an explicit paginator, say just next and previous buttons, it is easier to handle.

execut commented 3 years ago

Why use rest_framework.pagination.LimitOffsetPagination pagination in ProductListPagination?

Because unless you use an explicit paginator, say just next and previous buttons, it is easier to handle.

Got it

@jrief What do you think about task? How do you like my solution? Everything is fine?

runnyren commented 1 year ago

I have the same with shop system here