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 ref types #26121

Merged
merged 1 commit into from
May 4, 2021
Merged

[pickers] Fix ref types #26121

merged 1 commit into from
May 4, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 4, 2021

They were incorrectly typed as HTMLInputElement when it was HTMLDivElement at runtime. This affects TimePicker, DatePicker, DateTimePicker and their mobile and desktop variants.

The types were incorrectly casted. See ref: React.Ref<HTMLDivElement>,

@eps1lon eps1lon added typescript component: pickers This is the name of the generic UI component, not the React module! labels May 4, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented May 4, 2021

No bundle size changes

Generated by 🚫 dangerJS against 925f348

@oliviertassinari
Copy link
Member

From what I remember, the ref used to be incorrectly forwarded do the input element, instead of the root: mui/material-ui-pickers#1604.

@eps1lon eps1lon marked this pull request as ready for review May 4, 2021 09:19
@eps1lon eps1lon merged commit 95f5ca9 into mui:next May 4, 2021
@eps1lon eps1lon deleted the fix/pickers/ref-types branch May 4, 2021 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers 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.

3 participants