-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix: Cover block: Impossible to reset the minimum height value #24490
Fix: Cover block: Impossible to reset the minimum height value #24490
Conversation
Size Change: +23 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
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.
🚀 Looks good to me! Tested locally and it works. Thanks @jorgefilipecosta for helping with this!
Sidenote: I'm not sure what the solution is... but we need to come up with some sort of re-usable + unified system for handling input state, that accommodates being controlled/not-controlled, with reset handling.
As I've learned, reset handling is awkward as the consuming component may expect (or prefer) an empty string or null
. In some case, undefined
. 🙃
From an a11y perspective, I think it would be good to show a simple Reset button next to all number/slider controls like this. |
Yes, I agree that a reset button similar to what we have on the font size picker would make sense on the unit control component, as most of the times we want to allow the user to reset the field. |
Fix: #23988
This PR changes the UnitControl component to pass via the onChange cases where the input is made empty.
On the cover block, it resets the units in the cases where there is no value so the value of minimum height is totally reset when the user cleans the field.