Bug description

Pagination is not working correctly. When interacting with the dropdown menu to change the number of records to display, the number of records does not update.

If I set the 'server page length' to the value of 200, the number of records updates correctly based on the selection in the dropdown menu. However, if I leave the value at 10, the information does not update and continues to show only those 10 records, even when I select a higher number or the option to show all records from the selector.

I appreciate your help.

https://github.com/user-attachments/assets/16697e76-c86a-4f0f-a1d8-d00ee64e5114

Screenshots/recordings

You can see in the images that it always shows me 10 records even if I have a larger number selected.

Captura de pantalla 2024-12-26 152851 Captura de pantalla 2024-12-26 152905

Superset version

4.1.1

Python version

3.10

Node version

Not applicable

Browser

Chrome

Additional context

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

There are two similar unsolved discussions related to table chart pagination issues in Superset:

  1. Table chart pagination not working since version 4.1.0, last updated on December 23, 2024 [1].
  2. Table Chart, last updated on December 19, 2024 [2].

Regarding your issue, it seems that the 'server page length' setting is crucial for the pagination to work correctly. When you set it to 200, the records update as expected, but with the default value of 10, it doesn't update beyond that. This behavior might be related to how the 'server page length' interacts with the pagination controls. The 'server page length' determines the number of rows displayed per page when server-side pagination is enabled, and setting it to 0 means no pagination will be applied [3][4].

Additionally, there are conditions in the code that could prevent the pagination dropdown menu from updating the number of displayed records, such as the limitingFactor property, limitReached flag, and defaultQueryLimit [5].

You might want to check if the 'server pagination' option is enabled and ensure that the 'server page length' is set appropriately to see if it resolves the issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Comment From: rusackas

Sorry to ask the obvious question, but is the table scrollable (i.e. you SEE the first 10, but there are more that you can scroll to)?

I'm unable to reproduce this issue when I try it, and the change in the little page number buttons at the bottom of your screenshots also indicate it's working.

Comment From: Yisel-Ulloa

@rusackas

The table should be scrollable, as the total number of records is 1,695. However, as can be seen in the following video, regardless of the number of records I select from the dropdown menu, it always shows the same 10 records. What I've noticed is that the server page length is being treated as the maximum number of records to display, instead of the minimum value. For example, if I increase the server page length to 100, it only allows me to update to a number lower than 100.

We are not sure if we made any mistake during the version change and need help to resolve it. Thank you very much.

https://github.com/user-attachments/assets/f644d65e-1d80-4b1f-a88b-02c69bb6f679

Comment From: KlyapkoV

In a Table-type graph, if you select Server pagination and set the value to m, then when you select n in Show n entries only m records will be displayed on the page if n > m.

The dataset contains more than 10 rows.

Image

Image

Comment From: paulobitar

l I'm experiencing the same issue when using Superset with Impala. The table consistently displays the number of rows defined in the chart settings, regardless of any changes made via the dropdown. For example, if the chart is configured to show 50 rows, the table always displays 50 rows, even when I select 100 from the dropdown. However, the pagination correctly reflects the total number of pages, and when exporting to CSV, the full 100 records are downloaded. The issue seems to be isolated to the table display.

Comment From: amaannawab923

The mentioned issue has been fixed with the pr https://github.com/apache/superset/pull/33357 @rusackas

Comment From: rusackas

This should have been closed by https://github.com/apache/superset/pull/33357 (but it didn't have the "fixes #31626" text that automagically does so :D