Skip to content
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

Number field default value of zero must be deleted to enter a number #335

Open
globallyunique opened this issue May 28, 2024 · 1 comment

Comments

@globallyunique
Copy link

A number field displays with a default value of zero. To enter the desired value of the number the zero must usually be deleted, e.g.,

default is display as: '0'
want to enter a value of: '1'
type '1'
field contains '10'
must delete the '0'

I see that a digit is needed as a valid value for the field. Seems like special logic is needed for the first time the user enters the number field and if the value is zero it is deleted or a special empty indicator is shown, e.g., , that is deleted when a digit is typed.

@joswarmer
Copy link
Member

The problem is that we need to leave the number property in typescript initially undefined, and if the user does not change this, we need to take the possibility of being undefined into account where we (de)serialize the model. Need to check whether this is problematic in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants