tnx-shared 5.3.385 → 5.3.386

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.
@@ -34634,11 +34634,16 @@
34634
34634
  }
34635
34635
  // Trường hợp select all
34636
34636
  else {
34637
- var tmpDataSource = __spreadArray([], __read(this.dataSourceInternal));
34637
+ var arrValueSelected_1 = event.value.map(function (p) { return p[_this.control.valueField]; });
34638
+ var tmpDataSource = __spreadArray([], __read(this.dataSourceInternal.filter(function (p) { return arrValueSelected_1.includes(p.value[_this.control.valueField]); })));
34638
34639
  if (this.dataSourceInternal.some(function (p) { return p.hasOwnProperty('inactive'); })) {
34639
34640
  tmpDataSource = tmpDataSource.filter(function (p) { return !p.inactive; });
34640
34641
  }
34641
- this._value = tmpDataSource.map(function (q) { return q.value; });
34642
+ var arrValue = tmpDataSource.map(function (q) { return q.value; });
34643
+ if (this._returnValue && Array.isArray(this._returnValue) && this._returnValue.length) {
34644
+ arrValue.push.apply(arrValue, __spreadArray([], __read(this._returnValue.filter(function (p) { return !Array.isArray(p); }))));
34645
+ }
34646
+ this._value = this._commonService.distinctArray(arrValue);
34642
34647
  }
34643
34648
  }
34644
34649
  else if (this.control.selectDescendant) {