@eturnity/eturnity_reusable_components 1.1.96 → 1.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
:inputWidth="inputWidth"
|
|
22
22
|
:minWidth="minWidth"
|
|
23
23
|
:value="formatWithCurrency(value)"
|
|
24
|
-
:hasLength="!!value && !!value.length"
|
|
25
24
|
@blur="onInputBlur($event)"
|
|
26
25
|
@focus="focusInput()"
|
|
27
26
|
@keyup.enter="$emit('on-enter-click')"
|
|
@@ -86,7 +85,6 @@ const inputProps = {
|
|
|
86
85
|
hasUnit: Boolean,
|
|
87
86
|
inputWidth: String,
|
|
88
87
|
minWidth: String,
|
|
89
|
-
hasLength: Boolean,
|
|
90
88
|
isDisabled: Boolean,
|
|
91
89
|
noBorder: Boolean,
|
|
92
90
|
textAlign: String,
|
|
@@ -99,8 +97,6 @@ const InputContainer = styled("input", inputProps)`
|
|
|
99
97
|
? "1px solid " + props.theme.colors.red
|
|
100
98
|
: props.noBorder
|
|
101
99
|
? "none"
|
|
102
|
-
: props.hasLength
|
|
103
|
-
? "1px solid " + props.theme.colors.black
|
|
104
100
|
: "1px solid " + props.theme.colors.mediumGray};
|
|
105
101
|
padding: ${(props) =>
|
|
106
102
|
props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
|
|
@@ -275,7 +271,7 @@ export default {
|
|
|
275
271
|
methods: {
|
|
276
272
|
onChangeHandler(event) {
|
|
277
273
|
if (isNaN(event)) {
|
|
278
|
-
event =
|
|
274
|
+
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
279
275
|
}
|
|
280
276
|
this.$emit("input-change", event)
|
|
281
277
|
},
|
|
@@ -310,10 +306,10 @@ export default {
|
|
|
310
306
|
this.isFocused = false
|
|
311
307
|
let value = e.target.value
|
|
312
308
|
let evaluatedInput = this.onEvaluateCode(value)
|
|
313
|
-
this.onChangeHandler(evaluatedInput)
|
|
314
|
-
if ((
|
|
309
|
+
this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
|
|
310
|
+
if ((evaluatedInput && value.length) || this.minNumber !== null) {
|
|
315
311
|
this.textInput = numberToString({
|
|
316
|
-
value:
|
|
312
|
+
value: evaluatedInput && value.length ? evaluatedInput : this.minNumber,
|
|
317
313
|
numberPrecision: this.numberPrecision,
|
|
318
314
|
})
|
|
319
315
|
}
|