Repository navigation
Fix: Cover block: Impossible to reset the minimum height value - #24490
Conversation
|
Size Change: +23 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
ItsJonQ
left a comment
There was a problem hiding this comment.
🚀 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.