-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Select] Warn for unmatched value #17691
[Select] Warn for unmatched value #17691
Conversation
Details of bundle changes.Comparing: 9122b60...cd7f4b9
|
eb8624c
to
43ccfa4
Compare
43ccfa4
to
cd7f4b9
Compare
console.warn = (...args) => { | ||
// Can't use log as karma is not displaying them. | ||
console.info(...args); | ||
throw new Error(...args); |
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.
As we have started to use console.warn in the code base, I think that we should throw the tests for them. I could only find the origin of the new warning thanks to this. Turns out, the table pagination tests had unmatching values.
cc @eps1lon
@asownder95 Well done 👌 |
Resolves #17568
• Added console warning when the value is not an empty string or does not match any of the Select options.
• Updated unit tests to use
""
instead of"none"
to remove warnings when running tests.• Updated
DialogSelect
demo so that no console warning was produced when the None option was selected.• Updated the
value
prop description in Select component API docs to note that empty string will select no options.