-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
[joy-ui][Button] Fix disabled
prop priority when inside button group
#41000
Merged
ZeeshanTamboli
merged 4 commits into
mui:master
from
Smileek:smileek/fix-button-disabled-prop
Feb 12, 2024
Merged
[joy-ui][Button] Fix disabled
prop priority when inside button group
#41000
ZeeshanTamboli
merged 4 commits into
mui:master
from
Smileek:smileek/fix-button-disabled-prop
Feb 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Netlify deploy previewhttps://deploy-preview-41000--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
1 task
danilo-leal
changed the title
[joy-ui][Button] fix Button
[joy-ui][Button] Fix Feb 8, 2024
disabled
prop prioritydisabled
prop priority
danilo-leal
added
component: button
This is the name of the generic UI component, not the React module!
package: joy-ui
Specific to @mui/joy
labels
Feb 8, 2024
ZeeshanTamboli
added
bug 🐛
Something doesn't work
component: ButtonGroup
The React component.
labels
Feb 8, 2024
ZeeshanTamboli
changed the title
[joy-ui][Button] Fix
[joy-ui][Button] Fix Feb 8, 2024
disabled
prop prioritydisabled
prop priority when inside button grup
ZeeshanTamboli
changed the title
[joy-ui][Button] Fix
[joy-ui][Button] Fix Feb 8, 2024
disabled
prop priority when inside button grupdisabled
prop priority when inside button group
Also, it's a regression from #38673. |
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Smileek
force-pushed
the
smileek/fix-button-disabled-prop
branch
from
February 9, 2024 16:34
f228a0f
to
e9d460d
Compare
ZeeshanTamboli
approved these changes
Feb 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Smileek Thanks for the fix!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug 🐛
Something doesn't work
component: button
This is the name of the generic UI component, not the React module!
package: joy-ui
Specific to @mui/joy
regression
A bug, but worse
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.
Fixed a bug in the Button component:
ButtonGroup's
disabled
prop wasn't overridden, because the first part of(inProps.disabled || inProps.loading) ?? (buttonGroup.disabled || disabledProp || loading);
resulted in(false || undefined)
which isundefined
.The correct order is
(inProps.loading || inProps.disabled)
, because if it's loading, we should always disable a button. If it's not (whetherfalse
orundefined
), we should rely ondisabled
prop which could betrue
,false
orundefined
and make the whole construction work properly.