JSFiddle - React, Tailwind, and code Playground
by orolo
JavaScript
$("#name").autocomplete({
source: customerNames,
minLength: 2,
open: function(event, ui) {
$('.ui-menu-item').each(function(key, value) {
console.log($(value).text));
//this returns the proper "String" I'm looking for
selectedNames.push($(value).text());
});
console.log(selectedNames);
//this returns the entire object like so: [<li class . .. .>String</li>, <li . . . .
}
});