Skip to content

[material-ui] Fix theme defaultProps and missing exports - #49332

Merged
Janpot merged 1 commit into
mui:masterfrom
Janpot:fix/material-exports-theme-defaultprops
Oct 7, 2026
Merged

Janpot merged 1 commit into
mui:masterfrom
Janpot:fix/material-exports-theme-defaultprops

Conversation

@Janpot

@Janpot Janpot commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Fixes a few places where the theme types or the type declarations promise something the runtime doesn't deliver.

  • RadioGroup and MenuList are listed in the theme types, but they never called useDefaultProps, so theme.components.MuiRadioGroup.defaultProps and MuiMenuList.defaultProps had no effect. They now do. styleOverrides and variants still don't apply, since neither component has its own styled root.
  • usePagination was exported from the root index.js but missing from index.d.ts.
  • Stack/index.js and TablePaginationActions/index.js didn't re-export their classes module, so getStackUtilityClass and getTablePaginationActionsUtilityClass were typed but undefined at runtime.
  • MuiTabScrollButton works at runtime (useDefaultProps and styled use that name) but was missing from components.ts, props.ts and overrides.ts.

Part of #49337

- RadioGroup and MenuList now read theme defaultProps
- Export usePagination from the root types
- Export get*UtilityClass from Stack and TablePaginationActions at runtime
- Add MuiTabScrollButton to the theme component types
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49332--material-ui.netlify.app/
QR code for https://deploy-preview-49332--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 🔺+182B(+0.03%) 🔺+32B(+0.02%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@Janpot Janpot added the type: bug It doesn't behave as expected. label Oct 6, 2026
@Janpot
Janpot marked this pull request as ready for review October 6, 2026 16:15
@Janpot
Janpot requested a review from a team October 6, 2026 16:16
@mnajdova

mnajdova commented Oct 7, 2026

Copy link
Copy Markdown
Member

Let's cherry-pick these fixes to v9, what do you think?

@Janpot Janpot added needs cherry-pick The PR should be cherry-picked to master after merge. v9.x labels Oct 7, 2026
@Janpot
Janpot merged commit 0d3f3c9 into mui:master Oct 7, 2026
24 of 25 checks passed
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick PRs will be created targeting branches: v9.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs cherry-pick The PR should be cherry-picked to master after merge. type: bug It doesn't behave as expected. v9.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants