Commit dfb5912d authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Autocomplete: launch search when resetting value (when searchable)

parent 9af2b67b
......@@ -365,12 +365,13 @@ export class MatAutocompleteField implements OnInit, InputElement, OnDestroy, Co
filter(value => this.searchable && isNotNilString(value)),
// Mark as loading (to show loading spinner) - earlier as possible, so before the debounce time
tap(value => {
console.log(value, isNotNilString(value));
if (this.showLoadingSpinner) {
this.markAsLoading();
}
}),
// Filter if not enough character
filter(value => value && value.length >= this.suggestLengthThreshold),
filter(value => (value?.length || 0) >= this.suggestLengthThreshold),
// Wait a debounce time
debounceTime(this.debounceTime),
// DEBUG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment