jQuery UI autocomplete shows value instead of label in the input field
问题 A potentially simple issue with jQuery UI autocomplete is stumping me. My source is var ac = [ { label: "One Thing", value: "One-Thing" }, { label: "Two Thing", value: "Two-Thing" }, ] I am invoking the widget with $(function() { $( "#search" ).autocomplete({ source: PK.getAutocompleteSource(), focus: function( event, ui ) { $("#search").val(ui.item.label); return false; }, select: function( event, ui ) { $("#search").val(ui.item.label); PK.render(ui.item.value); } }); }); All works fine.