@sumaris-net/ngx-components 18.6.19-alpha1 → 18.6.19-alpha3
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.
|
@@ -8157,10 +8157,9 @@ class MatAutocompleteField {
|
|
|
8157
8157
|
}
|
|
8158
8158
|
this._implicitValue = null; // reset the implicit value
|
|
8159
8159
|
this.closePanel(); // Close panel
|
|
8160
|
-
// Invalidate loaded items
|
|
8160
|
+
// Invalidate loaded items
|
|
8161
8161
|
if (invalidateFilteredItems) {
|
|
8162
|
-
this.
|
|
8163
|
-
this.markAsLoading();
|
|
8162
|
+
this.markAsLoading(); // Should force next focus to reload items
|
|
8164
8163
|
}
|
|
8165
8164
|
// Move caret to the beginning (fix issue IMAGINE-469)
|
|
8166
8165
|
if (moveCaretToBeginning) {
|
|
@@ -8186,7 +8185,9 @@ class MatAutocompleteField {
|
|
|
8186
8185
|
}));
|
|
8187
8186
|
// Select input content, on focus or press enter
|
|
8188
8187
|
if (this.selectInputContentOnFocus && !this.mobile && !this.multiple) {
|
|
8189
|
-
this._subscription.add(merge(this.focused.pipe(filter((event) => !event.defaultPrevented)
|
|
8188
|
+
this._subscription.add(merge(this.focused.pipe(filter((event) => !event.defaultPrevented)
|
|
8189
|
+
//tap((event) => event.preventDefault())
|
|
8190
|
+
), this.keyupEnter.pipe(filter(() => isNotNilObject(this.formControl.value))))
|
|
8190
8191
|
.pipe(debounceTime(this.selectInputContentOnFocusDelay))
|
|
8191
8192
|
.subscribe(() => {
|
|
8192
8193
|
if (this.debug)
|
|
@@ -8449,11 +8450,14 @@ class MatAutocompleteField {
|
|
|
8449
8450
|
/* -- protected method -- */
|
|
8450
8451
|
markAsLoading() {
|
|
8451
8452
|
if (this._$filteredItems.value) {
|
|
8453
|
+
if (this.debug)
|
|
8454
|
+
console.debug(this.logPrefix + ' Marking as loading');
|
|
8452
8455
|
this._$filteredItems.next(undefined);
|
|
8453
8456
|
this._itemCount = undefined;
|
|
8454
8457
|
this._implicitValue = undefined;
|
|
8455
8458
|
this._onFetchMoreCallback = undefined;
|
|
8456
8459
|
this._moreItemsCount = 0;
|
|
8460
|
+
this._selectedItem = null;
|
|
8457
8461
|
this.markForCheck();
|
|
8458
8462
|
}
|
|
8459
8463
|
}
|