question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[doc] Adding the 'type' attribute description of <ButtonBase>

See original GitHub issue

In 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Jun 2, 2018

In HTML, the default value of the type attribute of the <button> tag is “submit”

@Chocolatl Yes, I can confirm this point: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button.

I hope to add a description of the type attribute in the document

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

0reactions
oliviertassinaricommented, Jun 3, 2018

@pnkapadia6 Of course, no need to ask 😃. The default value is expected. We need to make the behavior explicit in the API documentation page.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found