Datorita unui bug in componenta ui.autocomplete din libraria jQueryUI de fiecare data cand utilizatorul tasteaza in campul text performanta cautarii scade. Pentru a corecta acest lucru se adauga $(this).data(“ui-autocomplete”).menu.bindings = $(); in sectiunea search :
$("#birds").autocomplete({ source: "search.php", minLength: 2, select: function(event, ui){ log("Selected: " + ui.item.value + " aka " + ui.item.id); }, search: function(e,ui){ $(this).data("ui-autocomplete").menu.bindings = $(); } });
Leave a Reply