Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TablePagination] Drop component prop #37059

Merged
merged 11 commits into from
Apr 28, 2023

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Apr 27, 2023

part of #36679

BREAKING CHANGE

It will be covered by codemod, see #36831

For Base UI components, the component prop value should be moved to slots.root:

 <TablePagination
-  component="span"
+  slots={{ root: "span" }}
 />

If using TypeScript, you should add the custom component type as a generic on the TablePagination component.

-<TablePagination
+<TablePagination<typeof CustomComponent>
   slots={{ root: CustomComponent }}
   customProp="foo"
 />

@sai6855 sai6855 added breaking change package: base-ui Specific to @mui/base component: TablePagination The React component. labels Apr 27, 2023
@mui-bot
Copy link

mui-bot commented Apr 27, 2023

Netlify deploy preview

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against 1b46807

Copy link
Member

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:::info
The `slots` prop is available on all non-utility Base components.
See [Overriding component structure](/base/guides/overriding-component-structure/) for full details.

:::warning
If the root element is customized with both the `component` and `slots` props, then `component` will take precedence.
:::

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:::info
The `slots` prop is available on all non-utility Base components.
See [Overriding component structure](/base/guides/overriding-component-structure/) for full details.

@sai6855 sai6855 requested a review from hbjORbj April 27, 2023 13:20
@hbjORbj
Copy link
Member

hbjORbj commented Apr 27, 2023

Let's make the CI pass

@sai6855
Copy link
Contributor Author

sai6855 commented Apr 27, 2023

@hbjORbj all checks are passing

@hbjORbj hbjORbj merged commit b9edd3d into mui:master Apr 28, 2023
binh1298 pushed a commit to binh1298/material-ui that referenced this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants