@formio/js 5.0.0-dev.5809.36e6e3c → 5.0.0-dev.5810.b51094a

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/lib/cjs/Wizard.js CHANGED
@@ -715,7 +715,7 @@ class Wizard extends Webform_1.default {
715
715
  }
716
716
  else {
717
717
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
718
- this.scrollIntoView(this.element, true);
718
+ this.scrollIntoView(this.element);
719
719
  return Promise.reject(this.showErrors(errors, true));
720
720
  }
721
721
  }
@@ -1075,7 +1075,7 @@ declare class Component extends Element {
1075
1075
  */
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
- scrollIntoView(element: any, verticalOnly: any): void;
1078
+ scrollIntoView(element?: any): void;
1079
1079
  focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
@@ -3456,12 +3456,12 @@ class Component extends Element_1.default {
3456
3456
  this.on('render', () => this.focus(), true);
3457
3457
  }
3458
3458
  }
3459
- scrollIntoView(element = this.element, verticalOnly) {
3459
+ scrollIntoView(element = this.element) {
3460
3460
  if (!element) {
3461
3461
  return;
3462
3462
  }
3463
3463
  const { left, top } = element.getBoundingClientRect();
3464
- window.scrollTo(verticalOnly ? window.scrollX : left + window.scrollX, top + window.scrollY);
3464
+ window.scrollTo(left + window.scrollX, top + window.scrollY);
3465
3465
  }
3466
3466
  focus(index) {
3467
3467
  var _a, _b, _c;
@@ -37,6 +37,9 @@ class Multivalue extends Field_1.default {
37
37
  if (this.component.storeas === 'string') {
38
38
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
39
39
  }
40
+ if (this.component.type === 'hidden' && value.length > 1) {
41
+ return super.normalizeValue(value, flags);
42
+ }
40
43
  return super.normalizeValue(value[0] || emptyValue, flags);
41
44
  }
42
45
  else {
package/lib/mjs/Wizard.js CHANGED
@@ -705,7 +705,7 @@ export default class Wizard extends Webform {
705
705
  }
706
706
  else {
707
707
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
708
- this.scrollIntoView(this.element, true);
708
+ this.scrollIntoView(this.element);
709
709
  return Promise.reject(this.showErrors(errors, true));
710
710
  }
711
711
  }
@@ -1075,7 +1075,7 @@ declare class Component extends Element {
1075
1075
  */
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
- scrollIntoView(element: any, verticalOnly: any): void;
1078
+ scrollIntoView(element?: any): void;
1079
1079
  focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
@@ -3418,12 +3418,12 @@ export default class Component extends Element {
3418
3418
  this.on('render', () => this.focus(), true);
3419
3419
  }
3420
3420
  }
3421
- scrollIntoView(element = this.element, verticalOnly) {
3421
+ scrollIntoView(element = this.element) {
3422
3422
  if (!element) {
3423
3423
  return;
3424
3424
  }
3425
3425
  const { left, top } = element.getBoundingClientRect();
3426
- window.scrollTo(verticalOnly ? window.scrollX : left + window.scrollX, top + window.scrollY);
3426
+ window.scrollTo(left + window.scrollX, top + window.scrollY);
3427
3427
  }
3428
3428
  focus(index) {
3429
3429
  if ('beforeFocus' in this.parent) {
@@ -32,6 +32,9 @@ export default class Multivalue extends Field {
32
32
  if (this.component.storeas === 'string') {
33
33
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
34
34
  }
35
+ if (this.component.type === 'hidden' && value.length > 1) {
36
+ return super.normalizeValue(value, flags);
37
+ }
35
38
  return super.normalizeValue(value[0] || emptyValue, flags);
36
39
  }
37
40
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5809.36e6e3c",
3
+ "version": "5.0.0-dev.5810.b51094a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {