@formio/js 5.1.0-dev.6109.79f22ad → 5.1.0-dev.6112.eca5845

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.
@@ -740,7 +740,7 @@ class Component extends Element_1.default {
740
740
  this._conditionallyClear = true;
741
741
  return this._conditionallyClear;
742
742
  }
743
- this._conditionallyClear = this.hasSetValue ? false : this.parentShouldConditionallyClear();
743
+ this._conditionallyClear = this.parentShouldConditionallyClear();
744
744
  return this._conditionallyClear;
745
745
  }
746
746
  /**
@@ -89,7 +89,6 @@ export default class SelectComponent extends ListComponent {
89
89
  disableInfiniteScroll(): void;
90
90
  set serverCount(value: any);
91
91
  get serverCount(): any;
92
- shouldResetChoicesItems(items: any): boolean;
93
92
  setItems(items: any, fromSearch: any): void;
94
93
  selectItems: any;
95
94
  set downloadedResources(value: any);
@@ -355,18 +355,6 @@ class SelectComponent extends ListComponent_1.default {
355
355
  this.downloadedResources.serverCount = this.downloadedResources.length;
356
356
  this.serverCount = this.downloadedResources.length;
357
357
  }
358
- shouldResetChoicesItems(items) {
359
- if (this.choices._store.choices.length !== items.length) {
360
- return true;
361
- }
362
- for (let item of items) {
363
- const choicesItem = this.choices._store.choices.find((i) => i.label === item.label);
364
- if (!choicesItem) {
365
- return true;
366
- }
367
- }
368
- return false;
369
- }
370
358
  /* eslint-disable max-statements */
371
359
  setItems(items, fromSearch) {
372
360
  var _a, _b;
@@ -453,7 +441,7 @@ class SelectComponent extends ListComponent_1.default {
453
441
  this.addOption(itemValueAndLabel.value, itemValueAndLabel.label, {}, lodash_1.default.get(item, this.component.idPath, String(index)));
454
442
  });
455
443
  if (this.choices) {
456
- this.choices.setChoices(this.selectOptions, 'value', 'label', true, true, !fromSearch && this.shouldResetChoicesItems(this.selectOptions));
444
+ this.choices.setChoices(this.selectOptions, 'value', 'label', true);
457
445
  }
458
446
  else if (this.loading) {
459
447
  // Re-attach select input.
@@ -704,7 +704,7 @@ export default class Component extends Element {
704
704
  this._conditionallyClear = true;
705
705
  return this._conditionallyClear;
706
706
  }
707
- this._conditionallyClear = this.hasSetValue ? false : this.parentShouldConditionallyClear();
707
+ this._conditionallyClear = this.parentShouldConditionallyClear();
708
708
  return this._conditionallyClear;
709
709
  }
710
710
  /**
@@ -89,7 +89,6 @@ export default class SelectComponent extends ListComponent {
89
89
  disableInfiniteScroll(): void;
90
90
  set serverCount(value: any);
91
91
  get serverCount(): any;
92
- shouldResetChoicesItems(items: any): boolean;
93
92
  setItems(items: any, fromSearch: any): void;
94
93
  selectItems: any;
95
94
  set downloadedResources(value: any);
@@ -359,18 +359,6 @@ export default class SelectComponent extends ListComponent {
359
359
  this.downloadedResources.serverCount = this.downloadedResources.length;
360
360
  this.serverCount = this.downloadedResources.length;
361
361
  }
362
- shouldResetChoicesItems(items) {
363
- if (this.choices._store.choices.length !== items.length) {
364
- return true;
365
- }
366
- for (let item of items) {
367
- const choicesItem = this.choices._store.choices.find((i) => i.label === item.label);
368
- if (!choicesItem) {
369
- return true;
370
- }
371
- }
372
- return false;
373
- }
374
362
  /* eslint-disable max-statements */
375
363
  setItems(items, fromSearch) {
376
364
  this.selectItems = items;
@@ -456,7 +444,7 @@ export default class SelectComponent extends ListComponent {
456
444
  this.addOption(itemValueAndLabel.value, itemValueAndLabel.label, {}, _.get(item, this.component.idPath, String(index)));
457
445
  });
458
446
  if (this.choices) {
459
- this.choices.setChoices(this.selectOptions, 'value', 'label', true, true, !fromSearch && this.shouldResetChoicesItems(this.selectOptions));
447
+ this.choices.setChoices(this.selectOptions, 'value', 'label', true);
460
448
  }
461
449
  else if (this.loading) {
462
450
  // Re-attach select input.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6109.79f22ad",
3
+ "version": "5.1.0-dev.6112.eca5845",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {