Skip to content

[material-ui][Chip] Fix handling on event handlers #46263

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 4 commits into from
Jun 4, 2025

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Jun 3, 2025

@sai6855 sai6855 added component: chip This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material regression 🐛 A bug, but worse labels Jun 3, 2025
@mui-bot
Copy link

mui-bot commented Jun 3, 2025

Netlify deploy preview

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

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against feb2610

@sai6855 sai6855 marked this pull request as draft June 3, 2025 06:00
@sai6855 sai6855 requested a review from siriwatknp June 3, 2025 07:22
@sai6855 sai6855 marked this pull request as ready for review June 3, 2025 07:55
chip.focus();
});

fireEvent.keyDown(chip, { key: 'Enter' });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As keyDown can't be fired on non-focusable elements, i converted Chip to button by adding onClick={()=>{}} and then fired keyDown event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: chip This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material regression 🐛 A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chip] TypeError: onClick is not a function [Chip] TypeError: onClick is not a function
3 participants