Discussed in #920
Originally posted by eno-tech0 July 28, 2023
I need the ability to show the mask placeholder when focusing on an input. I tried to implement it via onFocus/onBlur, but got unexpected behavior.
If the field does not have a default value, then when a value is entered and unfocused, the label is lowered (expected behavior: the label remains raised if a value is entered in the field).
If the field has a default value and the entire value is erased - the label is not lowered (expected behavior: the label is lowered if the entire value is erased).
How can I get the expected behavior?
Here's an example: https://codesandbox.io/s/imask-mui-react-hook-form-swrc3w?file=/src/App.js
Discussed in #920
Originally posted by eno-tech0 July 28, 2023
I need the ability to show the mask placeholder when focusing on an input. I tried to implement it via onFocus/onBlur, but got unexpected behavior.
If the field does not have a default value, then when a value is entered and unfocused, the label is lowered (expected behavior: the label remains raised if a value is entered in the field).
If the field has a default value and the entire value is erased - the label is not lowered (expected behavior: the label is lowered if the entire value is erased).
How can I get the expected behavior?
Here's an example: https://codesandbox.io/s/imask-mui-react-hook-form-swrc3w?file=/src/App.js