igniteui-angular 13.2.15 → 13.2.17

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.
@@ -36012,7 +36012,8 @@ class IgxComboBaseDirective extends DisplayDensityBase {
36012
36012
  };
36013
36013
  this.findMatch = (element) => {
36014
36014
  const value = this.displayKey ? element[this.displayKey] : element;
36015
- return value?.toString().toLowerCase() === this.searchValue.trim().toLowerCase();
36015
+ const searchValue = this.searchValue || this.comboInput?.value;
36016
+ return value?.toString().toLowerCase() === searchValue.trim().toLowerCase();
36016
36017
  };
36017
36018
  }
36018
36019
  /**
@@ -36330,6 +36331,12 @@ class IgxComboBaseDirective extends DisplayDensityBase {
36330
36331
  });
36331
36332
  }
36332
36333
  /** @hidden @internal */
36334
+ ngDoCheck() {
36335
+ if (this.data?.length && this.selection.length) {
36336
+ this._value = this.createDisplayText(this.selection, []);
36337
+ }
36338
+ }
36339
+ /** @hidden @internal */
36333
36340
  ngOnDestroy() {
36334
36341
  this.destroy$.next();
36335
36342
  this.destroy$.complete();
@@ -37866,17 +37873,15 @@ class IgxSimpleComboComponent extends IgxComboBaseDirective {
37866
37873
  this.setSelection(newSelection);
37867
37874
  }
37868
37875
  clearOnBlur() {
37869
- const filtered = this.filteredData.find(this.findAllMatches);
37870
- if (filtered === undefined || filtered === null || this.selectionService.size(this.id) === 0) {
37876
+ const filtered = this.filteredData.find(this.findMatch);
37877
+ if (filtered === undefined || filtered === null || this.getElementKey(filtered) !== this.selectedItem) {
37871
37878
  this.clearAndClose();
37872
37879
  return;
37873
37880
  }
37874
- if (this.isPartialMatch(filtered) || this.getElementVal(filtered) !== this._internalFilter) {
37875
- this.clearAndClose();
37876
- }
37877
37881
  }
37878
- isPartialMatch(filtered) {
37879
- return !!this._internalFilter && this._internalFilter.length !== this.getElementVal(filtered).length;
37882
+ getElementKey(element) {
37883
+ const elementVal = this.valueKey ? element[this.valueKey] : element;
37884
+ return elementVal;
37880
37885
  }
37881
37886
  getElementVal(element) {
37882
37887
  const elementVal = this.displayKey ? element[this.displayKey] : element;
@@ -71580,10 +71585,7 @@ class BaseToolbarDirective {
71580
71585
  _setupListeners(toggleRef, actions) {
71581
71586
  if (actions) {
71582
71587
  if (!this.$sub || this.$sub.closed) {
71583
- this.$sub = actions.columnToggled.subscribe((event) => this.columnToggle.emit(event));
71584
- }
71585
- else {
71586
- this.$sub.unsubscribe();
71588
+ this.$sub = actions.columnToggled.pipe(takeUntil(this.$destroy)).subscribe((event) => this.columnToggle.emit(event));
71587
71589
  }
71588
71590
  }
71589
71591
  /** The if statement prevents emitting open and close events twice */