JSFiddle - React, Tailwind, and code Playground
HTML
<input id='search'/>
JavaScript
$('#search').autocomplete({
source: ['bob a', 'bob b', 'sam a', 'sam c'],
select: function(event, ui) {
console.log(ui);
},
open: function(event, ui) {
console.log(ui);
//The items are not returned in ui, only the object. UI should contain the information that was listed in the autocomplete menu.
}
});