forked from vue-generators/vue-form-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes vue-generators#361 - use $event.target.valueAsNumber for number…
…/range inputs, debounce `formatValueToModel` for number/range, removed `formatValueToField` Number inputs now support `10e10` formats being typed in, and stores the evaluated value of `10e10` (`100000000000`) on the model. * moved debouncedFormatDateTime to abstractField and renamed to debounceFormatFunc * create a `debounceFormatFunc` for number/range inputs, as well as date/datetime/datetime-local * changed @input to use `onInput` handler which checks for number/range and uses $event.target.valueAsNumber per @YgamiLight * set value to NaN if !isNumber(value) (NOTE: NaN is represented as "null" in JSON though as JSON does not support NaN/Infinity) * set all `inputType` checks and uses to use `inputType.toLowerCase()`, recommend doing this for all fields * created DEBOUNCE_FORMAT_MS constants in inputField.vue, set to default of 1000 ... recommend turning this into a standard schema option for all fields * wrapped one-liner conditionals with `{}` (just looks cleaner)
- Loading branch information
Showing
4 changed files
with
58 additions
and
55 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters