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

Can't set type="button" when using Button with a label. #4318

Closed
ThiefMaster opened this issue Jan 17, 2022 · 2 comments · Fixed by #4321
Closed

Can't set type="button" when using Button with a label. #4318

ThiefMaster opened this issue Jan 17, 2022 · 2 comments · Fixed by #4321
Labels

Comments

@ThiefMaster
Copy link

Bug Report

Steps

Create a Button component with a label and type="button"

Expected Result

The <button /> element should have type="button"

Actual Result

The attribute is set on the div around it where it's useless, so the button's onClick is triggered when pressing enter in some form field that submits the form (default type for a button is submit)

Version

2.0.4

Testcase

https://codesandbox.io/s/semantic-ui-react-forked-jx0wi

@ThiefMaster
Copy link
Author

Thanks for the quick fix!

@layershifter
Copy link
Member

layershifter commented Jan 19, 2022

@ThiefMaster the next release should happen on this/next week. If you're in rush I suggest to use patch-package 🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants