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] Add the rest of slots and slotProps. #44570

Merged
merged 17 commits into from
Dec 20, 2024

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Nov 27, 2024

Part of #41281

closes #43408 (see the fix)

  • Added root, toolbar, spacer, selectLabel, menuItem, displayedRows to slots and slotProps.
  • Codemod added.
  • Test/Spec updated

@siriwatknp siriwatknp added the component: TablePagination The React component. label Nov 27, 2024
@mui-bot
Copy link

mui-bot commented Nov 27, 2024

Netlify deploy preview

https://deploy-preview-44570--material-ui.netlify.app/

@material-ui/core: parsed: +0.11% , gzip: +0.09%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 97ec812

/**
* @ignore
*/
className: PropTypes.string,
Copy link
Member

Choose a reason for hiding this comment

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

Is this expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is generated from the proptypes script.

Copy link
Member

Choose a reason for hiding this comment

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

Right, I understand that. My question was, why in this PR related to adding slots, is the className being removed from the proptypes?

I see it was probably due to className being removed from the props destructuring here?

If so, that's ok. My only final question would be, if an user was providing className to this component, would this change make it throw a console warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

If so, that's ok. My only final question would be, if an user was providing className to this component, would this change make it throw a console warning?

No, it won't throw a warning. Tested with this sandbox.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 9, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 20, 2024
@siriwatknp siriwatknp merged commit 95ae871 into mui:master Dec 20, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: TablePagination The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-ui][TablePagination] selectLabel slot isnt applied
3 participants