Asked By: Anonymous
Creating a form with no values and would like the input field to default to empty for two reasons:
- Want users to be able to see the placeholder text.
- Having a default number means the users can ignore the field by default. (I know I can validate the field, but that is just a bad user experience.)
The problem:
el-input-number fields default to a number (0 or whatever the :min value is set to).
- This covers up the placeholder text.
- The users can click save with the default number still in place. (I will validate, but don’t want users to have to submit a bad value to know what to do.)
Does anyone know how to make the input field have the default value be just empty?
Solution
Answered By: Anonymous
just give it a default value of undefined