Scroller pagination issue: offset always 0

Scroller pagination issue: offset always 0

tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

Scroller pagination has always bit a bit of a mystery to me. I'd like to be able to configure that page size, it appears to guess the page size based on some hueristic.

Regardless, that's not really my problem. When scrolling through

https://packages.survos.com/

it works fine, you can see in the console that the offset changes.

But when selecting Symfony 7 and marking=valid

https://packages.survos.com/?marking=valid&symfonyVersions=7.0 (alas, due to an unrelated but, query string parameters aren't auto-selecting the facets, so to see the error you have to open the searchPanes and select these 2).

Now scroll through, and and the debug line shows the offset as always 0, so it never gets beyond 135.

I think this use to work, but may not. It seems to work without the facet searches, so maybe I'm encoding something wrong? Or maybe related to the sort?

Answers

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1
  • allanallan Posts: 61,628Questions: 1Answers: 10,091 Site admin

    Hi,

    Thanks for the link and video.

    The number of rows that Scroller selects to get and display is based on scroller.displayBuffer. That is basically the number of rows that fit into the viewport multiplied by that fixed factor.

    This is the code that does that.

    Regarding the offset, I'll need to come back to that. I'm traveling this week, so it will probably be next week before I get a chance to have proper look at it.

    Allan

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    Thanks -- that explains why when I open the console debugger the number of rows requested changes!

    I'm still stuck on the offset, I'd be grateful if you got a chance to look at it. Thanks.

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    Perhaps there's a version out of sync, I found this when trying to upgrade everything.

    [warning] datatables.net-scroller-bs5 requires datatables.net-bs5@1.11 - 2 but version 2.0.3 is installed.
    [warning] datatables.net-scroller-bs5 requires datatables.net-bs5@1.11 - 2 but version 2.0.3 is installed.
    [warning] datatables.net-scroller requires datatables.net@1.11 - 2 but version 2.0.3 is installed.
    [warning] datatables.net-scroller requires datatables.net@1.11 - 2 but version 2.0.3 is installed.
    
  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    Hi, any suggestions on where I can look to solve this?

  • allanallan Posts: 61,628Questions: 1Answers: 10,091 Site admin

    datatables.net-scroller requires datatables.net@1.11 - 2 but version 2.0.3 is installed

    That doesn't make a particularly huge amount of sense to me. 2.0.3 should be included in that range I thought. I understood it to be 1.11.* through 2.*.

    Checking with the npm SemVer Calculator appears to confirm this:

    What package manager are you using?

    Allan

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    AssetMapper (from Symfony) which downloads the packages from jsdelivr.

    I believe it then scans the downloaded package for dependencies and installs those.

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    But I'm not sure the problem is the packages, but rather that the callback isn't providing the right offset. Maybe it's a package sync issue, but that might be completely unrelated.

  • tacman1123tacman1123 Posts: 179Questions: 41Answers: 1

    I've added an issue to get rid of the warning in AssetMapper, but I'm almost positive that it's simply a false warning, and not the root of the pagination problem.

    https://github.com/symfony/symfony/issues/54610

Sign In or Register to comment.