We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using Safari on macOS Monterey.
This is how I tried initializing the autocompletion thing:
var ac; window.addEventListener("load", function () { let config = { selector: ".autocomplete", wrapper: true, data: { src: async (query) => { try { let source = await fetch(SUGGEST_ENDPOINT); return await source.json(); } catch (error) { return error; } }, keys: null }, debounce: 300, placeHolder: "Search", }; ac = new autoComplete({config}); }
Every time I reload the site, I get this error in the console:
[Error] Unhandled Promise Rejection: TypeError: el is not an Object. (evaluating 'key in el') create (autoComplete.js:182) (anonymous function) (autoComplete.js:557) Promise init (autoComplete.js:547) autoComplete (autoComplete.js:649) (anonymous function) (core.js:35)
What's happening here?
The text was updated successfully, but these errors were encountered:
Change
ac = new autoComplete({config});
to
ac = new autoComplete(config);
Sorry, something went wrong.
Well, that was easy. Please adjust the usage instructions here (https://tarekraafat.github.io/autoComplete.js/#/usage?id=_2-script) because they currently tell you to do what I did.
I agree, the instructions new autoComplete({ config }) are misleading. I had the same issue.
new autoComplete({ config })
No branches or pull requests
I'm using Safari on macOS Monterey.
This is how I tried initializing the autocompletion thing:
Every time I reload the site, I get this error in the console:
What's happening here?
The text was updated successfully, but these errors were encountered: