@fundamental-ngx/cdk 0.61.6 → 0.61.7
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.
|
@@ -710,7 +710,11 @@ class AutoCompleteDirective {
|
|
|
710
710
|
this.oldValue = this.inputText;
|
|
711
711
|
const item = this.options.find((option) => this.matcher(this.displayFn(option).toLocaleLowerCase(), this.inputText.toLocaleLowerCase()));
|
|
712
712
|
if (item) {
|
|
713
|
-
this.
|
|
713
|
+
const displayedValue = this.displayFn(item);
|
|
714
|
+
// Only autocomplete if the current native value matches the start of the found item
|
|
715
|
+
if (displayedValue.toLocaleLowerCase().startsWith(currentNativeValue.toLocaleLowerCase())) {
|
|
716
|
+
this._typeahead(displayedValue);
|
|
717
|
+
}
|
|
714
718
|
}
|
|
715
719
|
}
|
|
716
720
|
}
|