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.

[Button] disabled props not working with Reference

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

buttonRef.current.disabled = true; not disabling button

Expected Behavior 🤔

buttonRef.current.disabled = true; should disable button

Steps to Reproduce 🕹

https://codesandbox.io/s/material-ui-issue-forked-gn2qt?file=/src/Demo.js:181-215

Context 🔦

Your Environment 🌎

`npx @material-ui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @material-ui/envinfo` goes here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Apr 14, 2021

@Frekansapp Actually, the issue I recall might have been on another component. I have run a deep search in the history and can’t find anything on the button. In all these years a little level of request for it, this IMHO signal that it something we should ignore. Other perspectives, welcome.

1reaction
rahulmotwani1996commented, Apr 14, 2021

@Frekansapp I am also able to reproduce the issue. Looks like the click behaviour is not associated with the button.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery prop function does not work to disabled a button
I'm using JQuery function "prop" to change the state of a button to disabled for a while, when finish de process it usign...
Read more >
Button is not getting disable if adding disable attribute through ...
Steps: create button component using material-ui; create ref and pass it to button; pass that reference into any other component (B); In ...
Read more >
Binding Functions and Enable/Disable State in HTML Buttons ...
In your component's constructor, go ahead and define the isDisabled state with an initial value of false . This tells the user that...
Read more >
The Button element - HTML: HyperText Markup Language
If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted....
Read more >
Disable button in jQuery [With examples] - Alvaro Trigo
Select the button you want to disable. Use the jQuery prop method. Set the disabled property to true. The prop method admits two...
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