Skip to content

[material-ui][Select] Fix muiName property TypeScript error#41726

Merged
ZeeshanTamboli merged 4 commits intomui:nextfrom
EyaOuenniche:add-muiname-to-select-component
Apr 6, 2024
Merged

[material-ui][Select] Fix muiName property TypeScript error#41726
ZeeshanTamboli merged 4 commits intomui:nextfrom
EyaOuenniche:add-muiname-to-select-component

Conversation

@EyaOuenniche
Copy link
Contributor

@EyaOuenniche EyaOuenniche commented Mar 31, 2024

Summary
This pull request addresses a TypeScript error when assigning muiName to a custom component based on Material-UI's Select. It ensures the muiName property is properly recognized in the type definition, facilitating successful compilation.

Fixes #41707

@mui-bot
Copy link

mui-bot commented Mar 31, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 594b2d6

@danilo-leal danilo-leal changed the title Fix muiName Property TypeScript Error in Custom Select Component [material-ui][Select] Fix muiName property TypeScript error Apr 1, 2024
@EyaOuenniche EyaOuenniche force-pushed the add-muiname-to-select-component branch from c262f17 to d4da7e3 Compare April 2, 2024 09:13
@EyaOuenniche EyaOuenniche force-pushed the add-muiname-to-select-component branch from d4da7e3 to a0d7a86 Compare April 2, 2024 10:16
@ZeeshanTamboli ZeeshanTamboli added type: bug It doesn't behave as expected. type: regression A bug, but worse, it used to behave as expected. labels Apr 6, 2024

export interface FilledSelectProps extends Omit<FilledInputProps, 'value' | 'onChange'> {
export interface FilledSelectProps
extends Omit<FilledInputProps, 'value' | 'onChange' | 'id' | 'classes' | 'inputProps'> {
Copy link
Member

Choose a reason for hiding this comment

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

We need to omit these props in the types because the pnpm proptypes started to fail after the change in the Select definition below. I believe this adjustment is now correct. Previously, it may not have been picking up the props correctly, possibly due to an incorrect intersection with muiName: string.

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

@EyaOuenniche I made the expected changes. Thanks for the pull request.

@ZeeshanTamboli ZeeshanTamboli added the needs cherry-pick The PR should be cherry-picked to master after merge. label Apr 6, 2024
@ZeeshanTamboli ZeeshanTamboli merged commit f3cb496 into mui:next Apr 6, 2024
github-actions bot pushed a commit that referenced this pull request Apr 6, 2024
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
@oliviertassinari oliviertassinari removed the type: bug It doesn't behave as expected. label Apr 30, 2025
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. scope: select Changes related to the select. type: regression A bug, but worse, it used to behave as expected. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[material-ui][Select] "Property 'muiName' does not exist" on Select

5 participants