Closed
Description
$('#data').autocomplete({ source: ["sample Data 1", "sample data 2", "sample data 3"], minLength: 3, select: function(event, ui) { $('#data_id').val(ui.item.id); event.preventDefault(); }, focus: function(event, ui) { event.preventDefault(); $(this).val(ui.item.label); }, change: function(event,ui) { // Disallow text except from array list if (!ui.item) { $(this).val(''); $('#data_id').val(''); $(this).focus(); } }, });
after selecting the result form the first search when i tried to select item for next time (it occurs for each) i was unable to do that. I was testing it in electron js.
Metadata
Metadata
Assignees
Labels
No labels