bootstrap-ajax-typeahead icon indicating copy to clipboard operation
bootstrap-ajax-typeahead copied to clipboard

When i press enter without selecting any typeahead suggetions .Textbox change to empty.

Open Shaishav1412 opened this issue 9 years ago • 0 comments

` $('#txtSearchText').typeahead({

        ajax: {
            url: "/Home/GetSuggestTextByQuery",
            timeout: 500,
            hint: true,
            displayField: "title",
            triggerLength: 1,
            method: "get",
            loadingClass: "loading-circle",
            preDispatch: function (query) {
                //showLoadingMask(true);
                var selectval = $("#ddlSearchModelType").val();
                var brands = $('#ddlSearchModelType option:selected');
                if (brands.length != 1) {
                    selectval = "";
                }
                query = selectval + "!!--!!" + query;
                return {
                    query: query
                }
            },
            preProcess: function (data) {
                ///showLoadingMask(false);
                if (data.success === false) {
                    // Hide the list, there was some error
                    return false;
                }
                // We good!
                return data;
            }
        },
        scrollBar: true

    });

`

Shaishav1412 avatar May 12 '16 18:05 Shaishav1412