@mozaic-ds/angular 2.0.55 → 2.0.56

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.
@@ -17040,7 +17040,18 @@ class MozComboboxComponent {
17040
17040
  selectAll() {
17041
17041
  if (!this.multiple())
17042
17042
  return;
17043
- this.value.set([...this.allSelectableValues()]);
17043
+ const cmp = this.compareWith();
17044
+ const disabledValues = this.flatItems()
17045
+ .filter((i) => isFlatOption(i) && !!i.disabled)
17046
+ .map((i) => i.value);
17047
+ const current = this._currentValueAsArray();
17048
+ const keptDisabled = current.filter((sv) => disabledValues.some((dv) => cmp(sv, dv)));
17049
+ const next = [...this.allSelectableValues()];
17050
+ for (const dv of keptDisabled) {
17051
+ if (!next.some((sv) => cmp(sv, dv)))
17052
+ next.push(dv);
17053
+ }
17054
+ this.value.set(next);
17044
17055
  }
17045
17056
  clearSelection() {
17046
17057
  const cmp = this.compareWith();