-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[base-ui] useControllableReducer warns when controlled props become uncontrolled (and vice versa) #39096
Merged
mj12albert
merged 18 commits into
mui:master
from
mj12albert:use-controllable-reducer-warning
Dec 6, 2023
+191
−4
Merged
[base-ui] useControllableReducer warns when controlled props become uncontrolled (and vice versa) #39096
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
09b4c89
Add tests
mj12albert 6287ff9
Add a test for Select
mj12albert f90c026
Add warning when switching between controlled and uncontrolled
mj12albert 04fa0a8
Fix useTab test
mj12albert b2b5ec3
Update the message
mj12albert b05474b
Update message
mj12albert a14c35f
Update params
mj12albert bf7b9c1
Update message and params
mj12albert 23f6083
Update message and params again
mj12albert 2531a53
Gen api docs
mj12albert ab90257
Update test
mj12albert 66ae4b3
Merge remote-tracking branch 'upstream/master' into use-controllable-…
mj12albert d2ead09
Merge remote-tracking branch 'upstream/master' into use-controllable-…
mj12albert 8738931
Add componentName to reducer params for useMenu and useDropdown
mj12albert 2c882e1
Merge remote-tracking branch 'upstream/master' into use-controllable-…
mj12albert 2f01b01
Fix material-next Menu test
mj12albert 25beb01
Merge remote-tracking branch 'upstream/master' into use-controllable-…
mj12albert aa172e4
Merge remote-tracking branch 'upstream/master' into use-controllable-…
mj12albert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add warning when switching between controlled and uncontrolled
commit f90c026fd9e066ada413cf79ecbc34b21943d97a
There are no files selected for viewing
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
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
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.
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.
Should we add the prop name here?
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.
Yeah 👍 I will also pass in the component name too, as
useControllableReducer
is likely to be unhelpful for the user that needs to see the error ~