@skyux/lookup 6.0.0-beta.1 → 6.0.0-beta.2
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.
|
@@ -910,7 +910,12 @@ class SkyAutocompleteComponent {
|
|
|
910
910
|
* Returns the text to highlight based on exact matches, case-insensitive matches, and matches for corresponding diacritical characters (a will match à).
|
|
911
911
|
*/
|
|
912
912
|
getHighlightText(searchText) {
|
|
913
|
-
const normalizedSearchText = normalizeDiacritics(
|
|
913
|
+
const normalizedSearchText = normalizeDiacritics(searchText)
|
|
914
|
+
.toLocaleUpperCase()
|
|
915
|
+
.trim();
|
|
916
|
+
if (!normalizedSearchText) {
|
|
917
|
+
return [];
|
|
918
|
+
}
|
|
914
919
|
let matchesToHighlight = [];
|
|
915
920
|
for (let i = 0, n = this._searchResults.length; i < n; i++) {
|
|
916
921
|
const value = this._searchResults[i].data[this.descriptorProperty]
|