mediacube-ui 0.1.31 → 0.1.33
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
|
@@ -547,15 +547,11 @@ export default {
|
|
|
547
547
|
const cursor_position = this.getCaretPos(e.target)?.start
|
|
548
548
|
const prepared_value = this.formattedToNumber(value)
|
|
549
549
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
this.setCaretPos(e.target, cursor_position + space_length, cursor_position + space_length)
|
|
556
|
-
} else {
|
|
557
|
-
e.target.value = prepared_value
|
|
558
|
-
}
|
|
550
|
+
value = prepared_value ? parseFloat(prepared_value) : null
|
|
551
|
+
const formatted_value = this.getAmountFormat(prepared_value)
|
|
552
|
+
e.target.value = this.isRtl ? formatted_value.replace(/ /gm, '') : formatted_value
|
|
553
|
+
const space_length = e.target.value?.slice(0, cursor_position).replace(/[^ ]/gm, '')?.length || 0
|
|
554
|
+
this.setCaretPos(e.target, cursor_position + space_length, cursor_position + space_length)
|
|
559
555
|
break
|
|
560
556
|
}
|
|
561
557
|
|