@formio/js 5.0.0-dev.5810.b51094a → 5.0.0-dev.5811.fd4868a

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.
@@ -2646,9 +2646,6 @@ class Component extends Element_1.default {
2646
2646
  * @returns {*} - The normalized value.
2647
2647
  */
2648
2648
  normalizeValue(value) {
2649
- if (this.component.multiple && !Array.isArray(value)) {
2650
- value = value ? [value] : [];
2651
- }
2652
2649
  return value;
2653
2650
  }
2654
2651
  /**
@@ -34,12 +34,12 @@ class Multivalue extends Field_1.default {
34
34
  }
35
35
  else {
36
36
  if (Array.isArray(value) && !underlyingValueShouldBeArray) {
37
+ if (core_1.Utils.getModelType(this.component) === 'any') {
38
+ return super.normalizeValue(value, flags);
39
+ }
37
40
  if (this.component.storeas === 'string') {
38
41
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
39
42
  }
40
- if (this.component.type === 'hidden' && value.length > 1) {
41
- return super.normalizeValue(value, flags);
42
- }
43
43
  return super.normalizeValue(value[0] || emptyValue, flags);
44
44
  }
45
45
  else {
@@ -2612,9 +2612,6 @@ export default class Component extends Element {
2612
2612
  * @returns {*} - The normalized value.
2613
2613
  */
2614
2614
  normalizeValue(value) {
2615
- if (this.component.multiple && !Array.isArray(value)) {
2616
- value = value ? [value] : [];
2617
- }
2618
2615
  return value;
2619
2616
  }
2620
2617
  /**
@@ -29,12 +29,12 @@ export default class Multivalue extends Field {
29
29
  }
30
30
  else {
31
31
  if (Array.isArray(value) && !underlyingValueShouldBeArray) {
32
+ if (Utils.getModelType(this.component) === 'any') {
33
+ return super.normalizeValue(value, flags);
34
+ }
32
35
  if (this.component.storeas === 'string') {
33
36
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
34
37
  }
35
- if (this.component.type === 'hidden' && value.length > 1) {
36
- return super.normalizeValue(value, flags);
37
- }
38
38
  return super.normalizeValue(value[0] || emptyValue, flags);
39
39
  }
40
40
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5810.b51094a",
3
+ "version": "5.0.0-dev.5811.fd4868a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {