Copilot commented on code in PR #36780:
URL: https://github.com/apache/superset/pull/36780#discussion_r2648737054
##########
superset-frontend/packages/superset-ui-core/src/components/Table/index.tsx:
##########
@@ -283,8 +283,8 @@ export function Table<RecordType extends object>(
resizable = false,
reorderable = false,
usePagination = true,
- defaultPageSize = 15,
- pageSizeOptions = ['5', '15', '25', '50', '100'],
+ defaultPageSize = 50,
+ pageSizeOptions = ['50'],
Review Comment:
This change modifies the default props of a shared Table component used
throughout the application, not just in drill-to-details. While the current
usages appear to be protected (they either disable pagination, disable size
changer, or provide their own pageSizeOptions), this creates a potential
maintenance issue:
1. Any new code using the Table component will inherit these defaults (50
rows with only ['50'] as an option)
2. The original defaults (15 rows with ['5', '15', '25', '50', '100']
options) might be more appropriate for other tables
3. This change makes the component less flexible and reusable
A better approach would be to explicitly pass `pageSizeOptions={['50']}` in
DrillDetailPane.tsx (line 311-325) instead of changing the component defaults.
This would:
- Localize the fix to drill-to-details only
- Preserve the component's flexibility for other use cases
- Make the intent clearer and more maintainable
If the goal is to standardize all tables to 50 rows, this should be
documented as a breaking change with a clear rationale.
```suggestion
defaultPageSize = 15,
pageSizeOptions = ['5', '15', '25', '50', '100'],
```
--
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]