Uncaught TypeError: Cannot read property 'src' of undefined
See original GitHub issuenew autoComplete({
selector: "#search-address",
threshold: 1,
debounce: 100,
data: {
src: async function () {
const source = await fetch("https://suggestions.com/test", {
method: "POST",
mode: "cors",
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Token " + window.tokenDaData
},
body: JSON.stringify({ query: $("#search-address").val() })
});
const data = await source.json();
return data.suggestions;
},
key: ["unrestricted_value"],
cache: false
},
resultsList: {
maxResults: 10
},
onSelection: (feedback) => {
selectSuggestion(feedback.selection.value);
},
});
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@9.0.5/dist/js/autoComplete.min.js"></script>
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'src' of undefined
I am trying to implement a slide show, I have written following code but it's not working most probably due to the reason...
Read more >Uncaught TypeError: Cannot read property 'src' of undefined
Hi, I am having a problem when select a variable option and product reload a variable image it caught error : Uncaught TypeError:...
Read more >TypeError: Cannot read properties of undefined (reading 'src')
If an error occurs after a random number of trials then there is probably either a blank row at the bottom of your...
Read more >Error in render: "TypeError: Cannot read property 'src' of ...
Hi I use vue-easy-lightbox component inside Vue module and it works perfectly. When I open modal with product data from the shop, ...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
there was a conflict with this library: https://github.com/Pixabay/JavaScript-autoComplete
Thanks, @vodnicearv for your kind feedback.
I would appreciate it if you could share any details on that conflict maybe there is something that could be done to avoid it in future releases.
Cheers! 😃