You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Firstly, I've noticed that its type is String instead of Boolean.
Secondly, I've trying to set the prop disabled='disabled', but it does not work; and it is still enabled.
Other props of button with expected similar behaviour (boolean props) are: autoFocus, contentEditable, draggable, hidden, spellCheck, etc.
I finally got it done using the disabled attribute with a string as it is currently in the upstream repo.
Nevertheless, I was taking a look on how to change the PropTypes of html attributes, but I didn't find the way to do it. I guess that changing it directly in Button.react.js isn't the right way.
Have you tried setting it to simply True? I am doing that with html.Button for a long time and never had an issue with html.Button("I am a disabled button", disabled=True).
Activity
Akronix commentedon Jan 29, 2018
I finally got it done using the disabled attribute with a string as it is currently in the upstream repo.
Nevertheless, I was taking a look on how to change the PropTypes of html attributes, but I didn't find the way to do it. I guess that changing it directly in Button.react.js isn't the right way.
radekwlsk commentedon Jul 18, 2018
Have you tried setting it to simply
True? I am doing that withhtml.Buttonfor a long time and never had an issue withhtml.Button("I am a disabled button", disabled=True).Akronix commentedon Jul 23, 2018
Hmm I just checked and it does work! But the prop for disabled in the component is still Boolean 🤔