You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I needed a autocomplete to an input with only numbers.
Since the data that i have is a huge list I needed the match enabled.
But since the input was only numbers the function .search was not working properly.
As a turn around for this I changed the match method to this:
method: function(element, phrase) {
var elm = element + '';
if (elm.search(phrase) > -1) {
return true;
} else {
return false;
}
}
I'm sure tho, that there is a better way to avoid the issue.
The error i was getting is:
Uncaught TypeError: element.search is not a function
The text was updated successfully, but these errors were encountered:
So I needed a autocomplete to an input with only numbers.
Since the data that i have is a huge list I needed the match enabled.
But since the input was only numbers the function .search was not working properly.
As a turn around for this I changed the match method to this:
method: function(element, phrase) {
var elm = element + '';
if (elm.search(phrase) > -1) {
return true;
} else {
return false;
}
I'm sure tho, that there is a better way to avoid the issue.
The error i was getting is:
Uncaught TypeError: element.search is not a function
The text was updated successfully, but these errors were encountered: