I'm trying to extend ui.autocomplete by using widget factory:
$.widget( "custom.myautocomplete", $.ui.autocomplete, {
_renderItem: function( ul, item ) {
return $( "<li>" )
.text(item.label)
.appendTo( ul );
}
});
$(function() {
$("#inp").myautocomplete({
minLength: 1,
source: ["One","Two","Three","Four","Five"]
})
});
Searching works fine, but item selection does not work.