I am currently utilizing the Materialize CSS library and I came across an interesting feature for creating an #autocomplete dropdown (located at the end of the page).
However, upon trying to implement it, an error keeps popping up while typing.
Uncaught TypeError: this.source is not a function
at t.(anonymous function).(anonymous function)._search (http://localhost/imgup/js/jquery-ui.min.js:2345:101)
at t.(anonymous function).(anonymous function)._search (http://localhost/imgup/js/jquery-ui.min.js:139:77)
at t.(anonymous function).(anonymous function).search (http://localhost/imgup/js/jquery-ui.min.js:2341:175)
at t.(anonymous function).(anonymous function).search (http://localhost/imgup/js/jquery-ui.min.js:139:77)
at t.(anonymous function).(anonymous function). (http://localhost/imgup/js/jquery-ui.min.js:2337:74)
at i (http://localhost/imgup/js/jquery-ui.min.js:302:62)
Despite my efforts to find a solution, I was unable to locate any useful answers.
This snippet showcases the relevant Materialize CSS - HTML code:
<input type="text" id="autocomplete-input" class="autocomplete">
The accompanying JavaScript for enabling autocomplete functionality:
$('input.autocomplete').autocomplete({
data: {
"Apple": null,
"Microsoft": null,
"Google": 'http://placehold.it/250x250'
},
limit: 20, // The max amount of results that can be shown at once. Default: Infinity.
onAutocomplete: function(val) {
// Callback function when value is autcompleted.
},
minLength: 1, // The minimum length of the input for the autocomplete to start. Default: 1.
});
Additionally, there are screenshots illustrating the error logs encountered:
Error in console: https://i.sstatic.net/i0gsj.png
Error in file that is occurring - 1: https://i.sstatic.net/ebbWr.png
Error in file that is occurring - 2: https://i.sstatic.net/tcfjB.png
Error in file that is occurring - 3: https://i.sstatic.net/I5Lgl.png
Error in file that is occurring - 4: https://i.sstatic.net/w2h5d.png
Error in file that is occurring - 5: https://i.sstatic.net/1PMtF.png
If anyone could offer some assistance on resolving this issue, I would greatly appreciate it.