Skip to content
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

Incorrect empty check fails on 0 range value #3458

Closed
c-dante opened this issue Feb 25, 2023 · 4 comments · Fixed by #3465
Closed

Incorrect empty check fails on 0 range value #3458

c-dante opened this issue Feb 25, 2023 · 4 comments · Fixed by #3465
Labels
bug material-ui material-ui related theme issue

Comments

@c-dante
Copy link
Contributor

c-dante commented Feb 25, 2023

onChange(value ? value : options.emptyValue);

For ranges that include 0, this falsy check switches the value to the default instead of the correct value.

@github-actions github-actions bot added the needs triage Initial label given, to be assigned correct labels and assigned label Feb 25, 2023
@heath-freenome heath-freenome added bug material-ui material-ui related theme issue and removed needs triage Initial label given, to be assigned correct labels and assigned labels Feb 28, 2023
@heath-freenome
Copy link
Member

@c-dante Good catch, are you willing to provide a fix for the mui and material-ui packages (they have the same code)?

@c-dante
Copy link
Contributor Author

c-dante commented Feb 28, 2023

There's another issue where the value is undefined it flips the element from begin controlled/uncontrolled and throws a lot of warnings during development. Can likely patch that, too

@c-dante
Copy link
Contributor Author

c-dante commented Mar 2, 2023

@heath-freenome let me know what else is needed #3465 not sure what your release process is re updating package semver

@heath-freenome
Copy link
Member

There's another issue where the value is undefined it flips the element from begin controlled/uncontrolled and throws a lot of warnings during development. Can likely patch that, too

Is there an issue related to this problem? If not, please create one with reproducible steps and then provide a PR if you feel up to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug material-ui material-ui related theme issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants