-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[Autocomplete] Prevent renderValue
from being skipped when value is 0
#46145
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
Conversation
Netlify deploy previewhttps://deploy-preview-46145--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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.
I think the explicit check for value !== undefined
is redundant, as value != null
already covers both null and undefined.
okay i'll just remove that and raise a new PR, if that works? |
No need to raise a new PR — you can amend the commit and push to the same branch to update this one. |
okay i just did. Thanks |
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.
Thanks for the update! One small note — no need to strictly check for null here, != null
is sufficient.
renderValue
does not render falsy values
renderValue
does not render falsy valuesrenderValue
from being skipped when value is 0
i didn't really get that. Is that not what I did? |
I was suggesting to remove the strict check (like |
got it! Just made the necessary changes |
Can this branch be merged now? And this issue be close? |
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.
@LakshitAgarwal Thanks for the fix! I’ve added a test case as well.
Fixes #46131