toggle-components-library 1.25.25 → 1.25.26

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.25.25",
3
+ "version": "1.25.26",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -73,6 +73,10 @@ export default {
73
73
  errorMessage: {
74
74
  type: String,
75
75
  required: false
76
+ },
77
+ allowFloat: {
78
+ type: Boolean,
79
+ default: false
76
80
  }
77
81
  },
78
82
 
@@ -108,7 +112,11 @@ export default {
108
112
  // Recalculate value after ignoring "%" and "," in user input
109
113
  let newValue = parseFloat(modifiedValue.replace(/[^\d.]/g, ""));
110
114
  if(newValue)
111
- newValue = parseInt(newValue);
115
+ if(this.allowFloat){
116
+ newValue = parseFloat(newValue);
117
+ } else {
118
+ newValue = parseInt(newValue);
119
+ }
112
120
  else
113
121
  newValue = 0;
114
122