File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/shared/components/ncTable/partials/rowTypePartials Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1212 :min =" column.numberMin"
1313 :max =" column.numberMax"
1414 :readonly =" column.viewColumnInformation?.readonly"
15- :step =" getStep" >
15+ :step =" getStep"
16+ @blur =" validateAndUpdate"
17+ @keyup.enter =" validateAndUpdate" >
1618 <div v-if =" column.numberSuffix" class =" suffix" >
1719 {{ column.numberSuffix }}
1820 </div >
@@ -62,16 +64,13 @@ export default {
6264 }
6365 }
6466 },
65- set (v ) { this .$emit (' update:value' , this .parseValue (v)) },
67+ set (v ) {
68+ this .$emit (' update:value' , v === ' ' ? null : v)
69+ },
6670 },
6771 },
6872
6973 watch: {
70- localValue () {
71- const value = this .parseValue (this .localValue )
72- this .localValue = value
73- this .$emit (' update:value' , value)
74- },
7574 value () {
7675 this .localValue = this .value
7776 },
@@ -82,6 +81,11 @@ export default {
8281 },
8382
8483 methods: {
84+ validateAndUpdate () {
85+ const parsedValue = this .parseValue (this .localValue )
86+ this .localValue = parsedValue
87+ this .$emit (' update:value' , parsedValue)
88+ },
8589 parseValue (inputValue ) {
8690 if (inputValue === null || inputValue === ' ' ) {
8791 return null
You can’t perform that action at this time.
0 commit comments