I encountered an issue on the options select and focus of a custom autocomplete of jQuery. The ui.item should select the item selected but it selects data from the source.
I searched on Google and I can't find anyone with the same issue as me. Apart from this the code works fine. How can I fix the problem?
$("#RefProductHome").catcomplete({
source: data,
delay: 0,
focus: function(e, ui) {
console.log(ui.item) // => data
}
});
Order of the script: 1- Création custom catcomplete 2- Get data from two different api 3- Merge in two result i