fix: Undo Breaking Change by re-allowing disabled prop on button #8462
+6
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
Closes #7269
Closes #7816
Closes #7905
Also re-enables the only currently known workaround for the accessibility problem described in #7965.
Removing the ability to use the disabled-prop posed a breaking change, which is hereby fixed.
⛳️ Current behavior (updates)
Despite the
disabled
prop being exposed in the type system, any value given will be discarded and overwritten byisDisabled || isLoading
.🚀 New behavior
Values given to
disabled
-prop are now respected again.One use case (which was possible in 1.x up until 2.0.15) is the combination of
isLoading disabled={false}
to ensure that a button does not lose focus while in loading-state.💣 Is this a breaking change (Yes/No):
This reverts a breaking change.
📝 Additional Information
This closes #7907, effectively replacing it.