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

[pickers] Fix field types to avoid error on latest @types/react version #11397

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Dec 13, 2023

The fix is a cherry-pick of this commit: 1f0b104
We can't merge the #11280 yet.
In the meantime, shipping only this fix should help users avoid problems like this: #11280 (comment).

@LukasTy LukasTy added bug 🐛 Something doesn't work typescript component: pickers This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge labels Dec 13, 2023
@LukasTy LukasTy self-assigned this Dec 13, 2023
@mui-bot
Copy link

mui-bot commented Dec 13, 2023

Deploy preview: https://deploy-preview-11397--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 2694791

@michelengelen
Copy link
Member

Strange that they did change the type name for inputs specifically 🤷🏼

@LukasTy
Copy link
Member Author

LukasTy commented Dec 13, 2023

Strange that they did change the type name for inputs specifically 🤷🏼

They didn't.
It's just that they removed the placeholder field from the generic HTMLAttributes type.
Do you have a better idea of how to add this field instead?
Would you prefer to manually list it in our type? 🤔

@michelengelen
Copy link
Member

Strange that they did change the type name for inputs specifically 🤷🏼

They didn't. It's just that they removed the placeholder field from the generic HTMLAttributes type. Do you have a better idea of how to add this field instead? Would you prefer to manually list it in our type? 🤔

No, manually listing in our type would only complicate it more.
This is the most elegant and future proof approach.

I was just wondering why this change was needed. 🤷🏼

@LukasTy LukasTy merged commit d2dcf73 into mui:next Dec 13, 2023
21 checks passed
@LukasTy LukasTy deleted the fix-field-typing-with-latest-react-types branch December 13, 2023 08:49
LukasTy added a commit to LukasTy/mui-x that referenced this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants