pawelczak / EasyAutocomplete

JQuery autocomplete plugin
http://easyautocomplete.com
MIT License
729 stars 244 forks source link

Show 'No results found' when input query does not match data #461

Closed user1175 closed 11 months ago

user1175 commented 2 years ago

Hi, I am trying to show 'No results found' or similar messages when the input query does not match any data. Any help would be highly appreciated.

<input id="match">
<script>
var options = {
    data: [{"text": "Home", "page-link": "http://easyautocomplete.com/"},
        {"text": "Guide", "page-link": "http://easyautocomplete.com/guide"},
        {"text": "Themes", "page-link": "http://easyautocomplete.com/themes"},
        {"text": "Examples", "page-link": "http://easyautocomplete.com/examples"},
        {"text": "Download", "page-link": "http://easyautocomplete.com/download"},
        {"text": "Github", "page-link": "https://github.com/pawelczak/EasyAutocomplete"}],
getValue: "text",
template: {
type: "links",
fields: {
link: "page-link"
}
},
list: {
match: {
enabled: true
}
}
};

$("#match").easyAutocomplete(options);
</script>