fix: Restrict DrillDetailTable pageSizeOptions to only valid option (50)#37733
fix: Restrict DrillDetailTable pageSizeOptions to only valid option (50)#37733RamiNoodle733 wants to merge 1 commit intoapache:masterfrom
Conversation
Code Review Agent Run #883552Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Fixes apache#36267 The pageSize was hardcoded to 50 but pageSizeOptions allowed selecting other values (5, 15, 25, 100), causing pagination issues. This change restricts pageSizeOptions to only ['50'] since that's the only valid page size supported by the component.
42971b5 to
289b8fb
Compare
Code Review Agent Run #7ee860Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
I think if we want to only show 50 there needs to be a larger discussion as a whole. If you would want to fix it for the other options, then a discussion is probably not needed. |
Problem
The DrillDetailTable has a fixed page size of 50 (PAGE_SIZE constant), but the pageSizeOptions was not restricted, allowing users to select 5, 15, 25, 50, 100 from a dropdown. This caused confusion as selecting other values didn't work properly since the backend always returns 50 rows per page.
Solution
Added
pageSizeOptions={[PAGE_SIZE]}to the Table component in DrillDetailPane.tsx to restrict the dropdown to only show the valid option (50).Before
Users could select page sizes other than 50, but the table would still show 50 rows, causing a mismatch between the UI and actual data.
After
The page size dropdown only shows 50 as an option, which matches the actual behavior.
Fixes #36267