igniteui-angular 12.3.38 → 12.3.40

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.
@@ -39781,8 +39781,10 @@
39781
39781
  _this.manageRequiredAsterisk();
39782
39782
  };
39783
39783
  _this.findMatch = function (element) {
39784
+ var _a;
39784
39785
  var value = _this.displayKey ? element[_this.displayKey] : element;
39785
- return (value === null || value === void 0 ? void 0 : value.toString().toLowerCase()) === _this.searchValue.trim().toLowerCase();
39786
+ var searchValue = _this.searchValue || ((_a = _this.comboInput) === null || _a === void 0 ? void 0 : _a.value);
39787
+ return (value === null || value === void 0 ? void 0 : value.toString().toLowerCase()) === searchValue.trim().toLowerCase();
39786
39788
  };
39787
39789
  return _this;
39788
39790
  }
@@ -40161,6 +40163,13 @@
40161
40163
  });
40162
40164
  };
40163
40165
  /** @hidden @internal */
40166
+ IgxComboBaseDirective.prototype.ngDoCheck = function () {
40167
+ var _a;
40168
+ if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) && this.selection.length) {
40169
+ this._value = this.createDisplayText(this.selection, []);
40170
+ }
40171
+ };
40172
+ /** @hidden @internal */
40164
40173
  IgxComboBaseDirective.prototype.ngOnDestroy = function () {
40165
40174
  this.destroy$.next();
40166
40175
  this.destroy$.complete();
@@ -41660,17 +41669,15 @@
41660
41669
  this.setSelection(newSelection);
41661
41670
  };
41662
41671
  IgxSimpleComboComponent.prototype.clearOnBlur = function () {
41663
- var filtered = this.filteredData.find(this.findAllMatches);
41664
- if (filtered === undefined || filtered === null || this.selectionService.size(this.id) === 0) {
41672
+ var filtered = this.filteredData.find(this.findMatch);
41673
+ if (filtered === undefined || filtered === null || this.getElementKey(filtered) !== this.selectedItem) {
41665
41674
  this.clearAndClose();
41666
41675
  return;
41667
41676
  }
41668
- if (this.isPartialMatch(filtered) || this.getElementVal(filtered) !== this._internalFilter) {
41669
- this.clearAndClose();
41670
- }
41671
41677
  };
41672
- IgxSimpleComboComponent.prototype.isPartialMatch = function (filtered) {
41673
- return !!this._internalFilter && this._internalFilter.length !== this.getElementVal(filtered).length;
41678
+ IgxSimpleComboComponent.prototype.getElementKey = function (element) {
41679
+ var elementVal = this.valueKey ? element[this.valueKey] : element;
41680
+ return elementVal;
41674
41681
  };
41675
41682
  IgxSimpleComboComponent.prototype.getElementVal = function (element) {
41676
41683
  var elementVal = this.displayKey ? element[this.displayKey] : element;
@@ -71663,7 +71670,7 @@
71663
71670
  BaseToolbarDirective.prototype.toggle = function (anchorElement, toggleRef, actions) {
71664
71671
  var _this = this;
71665
71672
  if (actions) {
71666
- this._setupListeners(toggleRef);
71673
+ this._setupListeners(toggleRef, actions);
71667
71674
  var setHeight = function () {
71668
71675
  var _a;
71669
71676
  return actions.columnsAreaMaxHeight = actions.columnsAreaMaxHeight !== '100%'
@@ -71684,10 +71691,7 @@
71684
71691
  var _this = this;
71685
71692
  if (actions) {
71686
71693
  if (!this.$sub || this.$sub.closed) {
71687
- this.$sub = actions.columnToggled.subscribe(function (event) { return _this.columnToggle.emit(event); });
71688
- }
71689
- else {
71690
- this.$sub.unsubscribe();
71694
+ this.$sub = actions.columnToggled.pipe(operators.takeUntil(this.$destroyer)).subscribe(function (event) { return _this.columnToggle.emit(event); });
71691
71695
  }
71692
71696
  }
71693
71697
  /** The if statement prevents emitting open and close events twice */