Allow passing `type` to `<Button>`
See original GitHub issueHiya! In using the <kbd><Button></kbd> component inside of a form, I attempted to give it the type="submit"
attribute, but it was overwritten with type="button"
:
<form>
<Button type="submit">Place order for pizza</Button>
{/* rendered as <button type="button"> */}
</form>
It’d be great to allow type
to be set, and then I guess setting button
as the defaultProp
? Let me know if I can help!
cc @emplums, chatted about this in Slack 😊
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Pass additional data with submit button - Stack Overflow
How can I pass to my controller, or, whatever, additional value, which depends on button? <button type="submit" ?????? >Save</button> What should be here?...
Read more ><input type="button"> - HTML: HyperText Markup Language
elements of type button are rendered as simple push buttons, ... all three buttons to be disabled until the two second timeout has...
Read more >Button class: How to send arguments with function
I have a simple Button class in a parent scene that runs a function when tapped. It works perfectly now, as you pass...
Read more >Forms in HTML documents - W3C
Authors create buttons with the BUTTON element or the INPUT element. Please consult the definitions of these elements for details about specifying different ......
Read more >How to Pass Arguments to Tkinter Button Command?
Method 1: Pass Arguments to Tkinter Button using the lambda function. Import the Tkinter package and create a root window. Give the root ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting this, @JasonEtco! 🤘
Yeah, looks like
type="button"
was hard-coded in 7.0.0-beta. Should be fixed in 8.2.0-beta 👍 https://github.com/primer/components/blob/8714be7aa7f8c663edc2c13fa5bb78175b44178f/src/Button.js#L25-L27