freon4dsl / Freon4dsl

Web Native language Workbench with Projectional Web Editor
https://www.freon4dsl.dev
MIT License
63 stars 9 forks source link

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

Open globallyunique opened 3 months ago

globallyunique commented 3 months ago

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 commented 3 months ago

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.