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

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

Open
mogrady88 opened this issue Aug 22, 2024 · 3 comments
Open

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

mogrady88 opened this issue Aug 22, 2024 · 3 comments
Assignees
Labels
component: TablePagination The React component. customization: slot Component's slot customizability enhancement This is not a bug, nor a new feature package: material-ui Specific to @mui/material

Comments

@mogrady88
Copy link
Contributor

mogrady88 commented Aug 22, 2024

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

@mogrady88 mogrady88 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 22, 2024
@siriwatknp siriwatknp added the component: TablePagination The React component. label Aug 23, 2024
@siriwatknp siriwatknp added v7.x and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 23, 2024
@siriwatknp
Copy link
Member

Thanks for reporting the issue.

@siriwatknp siriwatknp added the customization: slot Component's slot customizability label Aug 23, 2024
@DiegoAndai
Copy link
Member

DiegoAndai commented Aug 28, 2024

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

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information package: material-ui Specific to @mui/material and removed status: waiting for author Issue with insufficient information labels Aug 28, 2024
@DiegoAndai DiegoAndai changed the title TablePagination: selectLabel slot isnt applied [material-ui][TablePagination] selectLabel slot isnt applied Aug 28, 2024
@mogrady88
Copy link
Contributor Author

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

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Aug 29, 2024
@siriwatknp siriwatknp added enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: TablePagination The React component. customization: slot Component's slot customizability enhancement This is not a bug, nor a new feature package: material-ui Specific to @mui/material
Projects
None yet
Development

No branches or pull requests

4 participants