durgaprasadml opened a new pull request, #42248:
URL: https://github.com/apache/superset/pull/42248

   ## Description
   
   ```markdown
   ### SUMMARY
   
   Fixes the server pagination page-size selector when the configured **Server 
Page Length** is greater than the total number of rows.
   
   Previously, the configured page size was filtered out whenever it exceeded 
the result row count. As a consequence, the selector could incorrectly fall 
back to `0`, display invalid page-size options, and prevent users from 
switching back to the configured page size without refreshing the page.
   
   This change:
   
   - Preserves the configured server page size even when it exceeds the current 
row count.
   - Prevents the page-size selector from falling back to an invalid `0` value 
when no exact match exists.
   - Selects the nearest valid page-size option if the configured value is 
unavailable.
   - Adds a regression test covering the scenario where `serverPageLength > 
rowCount`.
   
   Fixes #42243
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A
   
   ### TESTING INSTRUCTIONS
   
   1. Create a standard **Table** chart.
   2. Set **Row limit** to `10000`.
   3. Enable **Server pagination**.
   4. Set **Server Page Length** to `20`.
   5. Use a dataset returning **12 rows**.
   6. Verify that:
      - The page-size selector initially displays **20**.
      - The dropdown contains **10** and **20**.
      - The dropdown does **not** contain **0**.
   7. Change the page size to **10**.
   8. Verify that **20** remains available and can be selected again.
   9. Verify that server pagination behaves normally for datasets where the row 
count is greater than the configured page size.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #42243
   - [ ] Required feature flags
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to