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

[Input][base] Fix calling slotProps event handlers #37463

Merged
merged 2 commits into from Jun 5, 2023

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jun 1, 2023

@sai6855 sai6855 added bug 🐛 Something doesn't work package: base-ui Specific to @mui/base labels Jun 1, 2023
@mui-bot
Copy link

mui-bot commented Jun 1, 2023

Netlify deploy preview

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

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against 3b4ca16

getSlotProps: (otherHandlers: EventHandlers) => {
return getInputProps({
...otherHandlers,
...propsToForward,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

otherHandlers will have eventHandlers passed in slotProps where as propsToForward will have eventHandlers passed to Input component.

According to previous code, eventHandlers in propsToForward will always override eventHandlers passed in slotProps, this PR adds a small caveat to the functionality, where eventHandlers in propsToForward will only override if there is valid function available.

@ZeeshanTamboli ZeeshanTamboli added component: card This is the name of the generic UI component, not the React module! component: input This is the name of the generic UI component, not the React module! and removed component: card This is the name of the generic UI component, not the React module! labels Jun 2, 2023
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.

👍

@ZeeshanTamboli ZeeshanTamboli merged commit ce316de into mui:master Jun 5, 2023
18 checks passed
@sai6855 sai6855 deleted the base-input-onkeydown branch June 5, 2023 06:14
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: input This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[base][Input] inputProps onKeyDown is not working
3 participants