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

   ### SUMMARY
   Fixes #31403
   
   When using "View as Table" on a Mixed Chart, navigating to the last page and 
then searching for text not present in the table would cause an error: 
"getPaginationModel(): currentPage shouldn't be greater than totalPages"
   
   This PR fixes the issue by adding a `key` prop to the TableView component 
that changes with the filterText. This causes the component to remount and 
reset pagination to page 0 whenever the filter changes, preventing the 
pagination state from being out of sync with the filtered data.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: Error thrown when searching after navigating to last page
   After: Pagination resets to page 1 when filtering, no error
   
   ### TESTING INSTRUCTIONS
   1. Create or open a Mixed Chart (Mixed Time-Series) in Superset
   2. Click "View as Table" in the chart options menu  
   3. Navigate to the last page using pagination controls
   4. In the search box, type text that doesn't exist in the table
   5. Verify that no error occurs and the table shows "No results"
   6. Clear the search box and verify data returns to page 1
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #31403
   - [ ] Required feature flags: None
   - [x] Changes UI: Minor fix to table pagination behavior
   - [ ] Includes DB Migration: No
   - [ ] Introduces new feature or API: No
   - [ ] Removes existing feature or API: No
   
   🤖 Generated with [Claude Code](https://claude.ai/code)


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to