I am using this plugin: https://github.com/devbridge/jQuery-Autocomplete
I have added the following in my autocomplete function:
showNoSuggestionNotice: true,
noSuggestionNotice: 'No results found',
and the response I get from server side is:
{"suggestions":[]}
However, the notice never gets shown. Other things work as expected whenever there are results in the response.
EDIT: my existing code -
$('<selector>').autocomplete({
serviceUrl: '<my service url>',
minChars: 3,
autoSelectFirst: true,
showNoSuggestionNotice: true,
noSuggestionNotice: 'No results found',
formatResult: function (suggestion, currentValue) {
<some formatting logic here>
return resultStr;
},
onSelect: function (suggestion) {
<onSelect logic here>
}
});