mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
94.02k stars 32.3k forks source link

[material-ui][TablePagination] `selectLabel` slot isnt applied #43408

Open mogrady88 opened 3 months ago

mogrady88 commented 3 months ago

Steps to reproduce

Link to live example: (required)

https://mui.com/material-ui/react-pagination/#table-pagination

Steps:

  1. add the following to the demo: selectLabel: { 'aria-label': 'LABEL' },
  2. See that it's not applied.

This occurs for both the slots and slotProps entries of stepLabel.

Current behavior

stepLabel is present in the source code but it doesn't go anywhere. Adding that slot/slotProp doesnt affect the component.

Expected behavior

stepLabel is available in slots/slotProps and will affect the render of TablePagination

Context

We're trying to use a Typography component where this label is so it matches UX designs

Your environment

npx @mui/envinfo ``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```

Search keywords: TablePagination stepLabel

siriwatknp commented 3 months ago

Thanks for reporting the issue.

DiegoAndai commented 2 months ago

Hey @mogrady88, what are you trying to achieve specifically?

Here's an example of how to use TablePagination's slotProps: https://stackblitz.com/edit/react-xvabij?file=Demo.tsx, to provide props to slotProps.select.

Which is documented here: https://mui.com/material-ui/api/table-pagination/#table-pagination-prop-slotProps

mogrady88 commented 2 months ago

Hey Diego. That slot you're using is select. Im looking at selectLabel specifically. We need to style it to look like one of our Typography variants but those props arent passed to the appropriate element