-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Undo Breaking Change by re-allowing disabled prop on button #8462
fix: Undo Breaking Change by re-allowing disabled prop on button #8462
Conversation
This reverts commit 0f37665. Fixes chakra-ui#7269, chakra-ui#7816 and chakra-ui#7905 and also enables the only currently known workaround for chakra-ui#7965. Removing the ability to use the disabled-prop posed a breaking change, which is hereby fixed.
🦋 Changeset detectedLatest commit: 983650a The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@segunadebayo Kindly have a look. This reverts a breaking change in v2 that affected quite a lot of users, see linked issues for reference. Speaking for our team: we have an application that we'd love to update to v2 to bring it in line with React 18, however we cannot upgrade as it would break accessibility of toggle buttons losing their focus when On a side note, I haven't reviewed the state machine config for buttons in zagjs, so i'm just referencing #7724 and #7965 for your attention, which may get solved in v3. Really thrilled about zag+ark btw 🚀 Thanks in advance. |
@segunadebayo Many thanks for merging! Can you say when 2.8.3 is going to be published so this (along with other improvements such as #8104) will become available? |
📝 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.