Rohan

Rohan

  • NA
  • 1.4k
  • 104.4k

user is using mouse up and down arrows to select auto suggested

Jul 27 2021 5:19 AM

I have use this code for autocomplete it's working but autocomplete not working .when user is using mouse up and down arrows to select auto suggested

Please check this 

 

$(function () {
    var apiurl = baseurls + "api/SearchTypeahead/Typeahead";
    $(document).on("keydown.autocomplete", "#searchlist", function () {
        var charLength = $(this).val().length;
        if (charLength >= 3) {
            $("#searchlist").autocomplete({           
                source: function (request, response) {
                    $.ajax({
                        url: apiurl,
                        dataType: "json",
                        data: {
                            term: request.term
                        },
                     
            };
        }
    });
});


Answers (2)