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

React buttons default to type submit and will submit html form #88

Closed
ryanlewis94 opened this issue Jun 24, 2024 · 5 comments · Fixed by #89
Closed

React buttons default to type submit and will submit html form #88

ryanlewis94 opened this issue Jun 24, 2024 · 5 comments · Fixed by #89
Assignees

Comments

@ryanlewis94
Copy link

Our current implementation uses a form whereby users can submit patients details and save them by submitting a form.
I have noticed that when clicking any of the buttons on react component it will attempt to submit our form. I believe this is because in React if you do not specify a type, then the buttons default type is submit.
If possible can the buttons specify type button so we do not get this issue?

@mbarton
Copy link
Member

mbarton commented Jun 24, 2024

Thanks for reporting @ryanlewis94 - I think this should be a straightforward change. Let me look into it

@mbarton
Copy link
Member

mbarton commented Jul 15, 2024

@ryanlewis94
Copy link
Author

@mbarton it looks like gradient-labels-button does not specify a type and therefore is still causing the issue
image

@mbarton
Copy link
Member

mbarton commented Jul 15, 2024

Hmm yeah sorry about that - I thought I had covered off all the buttons. I'll have a look now

@mbarton
Copy link
Member

mbarton commented Jul 15, 2024

@ryanlewis94 I've released v7.0.6 which fixes the gradient labels button too

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