@steroidsjs/core 3.0.40 → 3.0.41

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": "@steroidsjs/core",
3
- "version": "3.0.40",
3
+ "version": "3.0.41",
4
4
  "description": "",
5
5
  "author": "Vladimir Kozhin <hello@kozhindev.com>",
6
6
  "repository": {
@@ -97,6 +97,11 @@ var getCaptchaToken = function (params) {
97
97
  });
98
98
  });
99
99
  };
100
+ var normalizeInitialQuery = function (initialQuery) { return Object.keys(initialQuery).reduce(function (acc, key) {
101
+ var valueInNumberFormat = Number(initialQuery[key]);
102
+ acc[key] = Number.isNaN(valueInNumberFormat) ? initialQuery[key] : Number(initialQuery[key]);
103
+ return acc;
104
+ }, {}); };
100
105
  function Form(props) {
101
106
  var _this = this;
102
107
  // Dev validation. You cannot change data provider (formId, useRedux)
@@ -119,7 +124,7 @@ function Form(props) {
119
124
  if (isFirstMount) {
120
125
  // Query
121
126
  if (initialQuery) {
122
- initialValues = __assign(__assign({}, props.initialValues), initialQuery);
127
+ initialValues = __assign(__assign({}, props.initialValues), normalizeInitialQuery(initialQuery));
123
128
  }
124
129
  // Local storage
125
130
  if (props.autoSave) {