-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search with offline data is not working. #168
Comments
From looking at your fiddle, I think you haven't passed the search function as one of the properties when calling new Autocomplete('.search', { baseClass: 'search' }); e.g. const offLineSearch = (input) => {
const _input = input.toLowerCase();
const options = ['First result', 'Second result'];
return options.filter((option) => option.toLowerCase().includes(_input));
};
new Autocomplete('.search', {
baseClass: 'search',
search: offLineSearch,
}); The search function can include your offline data.
See https://codepen.io/evanwills/pen/xxBBzOy for a working example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I try to test the following example with offline data, the following message always appears.
Documentation: https://autocomplete.trevoreyre.com/#/javascript-component?id=baseclass
Message: Uncaught TypeError: l is not a function
Example: https://jsfiddle.net/3aztrv6n/
The text was updated successfully, but these errors were encountered: