igniteui-angular 12.3.41 → 12.3.42
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.
- package/bundles/igniteui-angular.umd.js +26 -13
- package/bundles/igniteui-angular.umd.js.map +1 -1
- package/esm2015/lib/simple-combo/simple-combo.component.js +27 -14
- package/fesm2015/igniteui-angular.js +26 -13
- package/fesm2015/igniteui-angular.js.map +1 -1
- package/igniteui-angular.metadata.json +1 -1
- package/lib/simple-combo/simple-combo.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -41359,6 +41359,7 @@
|
|
|
41359
41359
|
_this._updateInput = true;
|
|
41360
41360
|
// stores the last filtered value - move to common?
|
|
41361
41361
|
_this._internalFilter = '';
|
|
41362
|
+
_this._collapsing = false;
|
|
41362
41363
|
_this.findAllMatches = function (element) {
|
|
41363
41364
|
var value = _this.displayKey ? element[_this.displayKey] : element;
|
|
41364
41365
|
if (value === null || value === undefined || value === '') {
|
|
@@ -41473,7 +41474,11 @@
|
|
|
41473
41474
|
}
|
|
41474
41475
|
}
|
|
41475
41476
|
});
|
|
41476
|
-
this.dropdown.opening.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41477
|
+
this.dropdown.opening.pipe(operators.takeUntil(this.destroy$)).subscribe(function (args) {
|
|
41478
|
+
if (args.cancel) {
|
|
41479
|
+
return;
|
|
41480
|
+
}
|
|
41481
|
+
_this._collapsing = false;
|
|
41477
41482
|
var filtered = _this.filteredData.find(_this.findAllMatches);
|
|
41478
41483
|
if (filtered === undefined || filtered === null) {
|
|
41479
41484
|
_this.filterValue = _this.searchValue = _this.comboInput.value;
|
|
@@ -41488,13 +41493,17 @@
|
|
|
41488
41493
|
_this._internalFilter = _this.comboInput.value;
|
|
41489
41494
|
});
|
|
41490
41495
|
this.dropdown.closing.pipe(operators.takeUntil(this.destroy$)).subscribe(function (args) {
|
|
41496
|
+
if (args.cancel) {
|
|
41497
|
+
return;
|
|
41498
|
+
}
|
|
41491
41499
|
if (_this.getEditElement() && !args.event) {
|
|
41492
|
-
_this.
|
|
41500
|
+
_this._collapsing = true;
|
|
41493
41501
|
}
|
|
41494
41502
|
else {
|
|
41495
41503
|
_this.clearOnBlur();
|
|
41496
41504
|
_this._onTouchedCallback();
|
|
41497
41505
|
}
|
|
41506
|
+
_this.comboInput.focus();
|
|
41498
41507
|
});
|
|
41499
41508
|
this.dropdown.closed.pipe(operators.takeUntil(this.destroy$)).subscribe(function () {
|
|
41500
41509
|
_this.filterValue = _this._internalFilter = _this.comboInput.value;
|
|
@@ -41516,7 +41525,7 @@
|
|
|
41516
41525
|
if (this.collapsed && this.comboInput.focused) {
|
|
41517
41526
|
this.open();
|
|
41518
41527
|
}
|
|
41519
|
-
if (!this.comboInput.value.trim() && this.
|
|
41528
|
+
if (!this.comboInput.value.trim() && this.selection.length) {
|
|
41520
41529
|
// handle clearing of input by space
|
|
41521
41530
|
this.clearSelection();
|
|
41522
41531
|
this._onChangeCallback(null);
|
|
@@ -41551,6 +41560,7 @@
|
|
|
41551
41560
|
}
|
|
41552
41561
|
if (!this.collapsed && event.key === this.platformUtil.KEYMAP.TAB) {
|
|
41553
41562
|
this.clearOnBlur();
|
|
41563
|
+
this.close();
|
|
41554
41564
|
}
|
|
41555
41565
|
this.composing = false;
|
|
41556
41566
|
_super.prototype.handleKeyDown.call(this, event);
|
|
@@ -41582,6 +41592,15 @@
|
|
|
41582
41592
|
this.comboInput.focus();
|
|
41583
41593
|
};
|
|
41584
41594
|
/** @hidden @internal */
|
|
41595
|
+
IgxSimpleComboComponent.prototype.onBlur = function () {
|
|
41596
|
+
// when clicking the toggle button to close the combo and immediately clicking outside of it
|
|
41597
|
+
// the collapsed state is not modified as the dropdown is still not closed
|
|
41598
|
+
if (this.collapsed || this._collapsing) {
|
|
41599
|
+
this.clearOnBlur();
|
|
41600
|
+
}
|
|
41601
|
+
_super.prototype.onBlur.call(this);
|
|
41602
|
+
};
|
|
41603
|
+
/** @hidden @internal */
|
|
41585
41604
|
IgxSimpleComboComponent.prototype.onFocus = function () {
|
|
41586
41605
|
this._internalFilter = this.comboInput.value || '';
|
|
41587
41606
|
};
|
|
@@ -41698,26 +41717,20 @@
|
|
|
41698
41717
|
};
|
|
41699
41718
|
IgxSimpleComboComponent.prototype.clearOnBlur = function () {
|
|
41700
41719
|
var filtered = this.filteredData.find(this.findMatch);
|
|
41701
|
-
|
|
41702
|
-
|
|
41720
|
+
// selecting null in primitive data returns undefined as the search text is '', but the item is null
|
|
41721
|
+
if (filtered === undefined && this.selectedItem !== null || !this.selection.length) {
|
|
41722
|
+
this.clear();
|
|
41703
41723
|
return;
|
|
41704
41724
|
}
|
|
41705
41725
|
};
|
|
41706
|
-
IgxSimpleComboComponent.prototype.getElementKey = function (element) {
|
|
41707
|
-
var elementVal = this.valueKey ? element[this.valueKey] : element;
|
|
41708
|
-
return elementVal;
|
|
41709
|
-
};
|
|
41710
41726
|
IgxSimpleComboComponent.prototype.getElementVal = function (element) {
|
|
41711
41727
|
var elementVal = this.displayKey ? element[this.displayKey] : element;
|
|
41712
41728
|
return String(elementVal);
|
|
41713
41729
|
};
|
|
41714
|
-
IgxSimpleComboComponent.prototype.
|
|
41730
|
+
IgxSimpleComboComponent.prototype.clear = function () {
|
|
41715
41731
|
this.clearSelection(true);
|
|
41716
41732
|
this._internalFilter = '';
|
|
41717
41733
|
this.searchValue = '';
|
|
41718
|
-
if (!this.collapsed) {
|
|
41719
|
-
this.close();
|
|
41720
|
-
}
|
|
41721
41734
|
};
|
|
41722
41735
|
IgxSimpleComboComponent.prototype.isValid = function (value) {
|
|
41723
41736
|
return this.required
|