Skip to content

[material-ui] Corrected generic type definition in SelectChangeEvent #45941

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

Merged
merged 3 commits into from
Apr 18, 2025

Conversation

SuyashShukla0007
Copy link
Contributor

@SuyashShukla0007 SuyashShukla0007 commented Apr 17, 2025

closes #44783
closes #33399

@mui-bot
Copy link

mui-bot commented Apr 17, 2025

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 9159300

@siriwatknp siriwatknp added component: select This is the name of the generic UI component, not the React module! typescript labels Apr 18, 2025
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍 Thanks for your contribution!

Added a spec and make it support number.

@siriwatknp siriwatknp changed the title (fix): Corrected generic type definition in SelectChangeEvent [material-ui] Corrected generic type definition in SelectChangeEvent Apr 18, 2025
@siriwatknp siriwatknp enabled auto-merge (squash) April 18, 2025 09:10
@siriwatknp siriwatknp merged commit 1464097 into mui:master Apr 18, 2025
21 checks passed
@Methuselah96
Copy link
Contributor

Methuselah96 commented May 12, 2025

@siriwatknp Is this change correct for numbers? This PR updates the types for Select so that event.target.value is a number when I pass a number into the value prop, but when I inspect event.target.value in Chrome DevTools, it's a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect generic type definition is SelectChangeEvent <Select />'s onChange does not follow the type that I specify
4 participants