[doc] Adding the 'type' attribute description of <ButtonBase>
See original GitHub issueIn HTML, the default value of the type
attribute of the <button>
tag is "submit"
, but in MDUI’s <ButtonBase>
, the default value of the type
attribute is "button"
, which results in no form submission behavior by default.
This difference was confusing to me, although the type
attribute of <ButtonBase>
can be specified, but the doc did not give instructions, I hope to add a description of the type
attribute in the document
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
[Button] Is the 'type' prop really removed from ButtonBase?
According to the docs, ButtonBase no longer has a type prop (which had values submit, reset, and button). Is this a deliberate change, ......
Read more >Button API - Material UI - MUI
Rule name Global class Description
root.MuiButton‑root Styles applied to the root element.
fullWidth.MuiButton‑fullWidth Styles applied to the root element if fullWidth= .
endIcon.MuiButton‑endIcon Styles applied to...
Read more >Button Class (System.Windows.Controls) | Microsoft Learn
Gets a value indicating whether the mouse pointer is located over this element (including child elements in the visual tree). This is a...
Read more >Buttons - Creative Tim
Bootstrap's .button styles can be applied to other elements, such as <label> s, to provide checkbox or radio style button toggling. Add data-toggle="buttons"...
Read more >Button (JavaFX 8) - Oracle Help Center
public class Button extends ButtonBase ... Type, Property and Description ... Invoked when a user gesture indicates that an event for this ButtonBase...
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
@Chocolatl Yes, I can confirm this point: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button.
I’m all 💯 with you on this pain point. There is room for improvement. We should improve the description: https://github.com/mui-org/material-ui/blob/b431b3b40c01cd7f2c649010136cb4a919914ccd/packages/material-ui/src/ButtonBase/ButtonBase.js#L425-L428
@pnkapadia6 Of course, no need to ask 😃. The default value is expected. We need to make the behavior explicit in the API documentation page.