Reputation: 1270
I have a autocomplete kendo control which I use with Angular, its working as expected but I don't want to show the "NO DATA FOUND" list when there are no records match the text that the user enter.
I find the option k-no-data-template but this set the template in case no data was found.
Basically I want to show the list only if there are match results.
Upvotes: 6
Views: 6000
Reputation: 1660
You can set this globally by css/sass:
.k-nodata
*
display: none
&:after
content: 'your custom text'
Upvotes: 0
Reputation: 3906
You can try this:
noDataTemplate: ''
for example
$("#autocomplete").kendoAutoComplete({
dataSource: [
{ id: 1, city: "Bangalore" },
{ id: 2, city: "Pune" }
],
dataTextField: "city",
noDataTemplate: ''
});
So here, No Data found message won't come and even if you want to customize it put then:
noDataTemplate: 'customized message' // if you want to show your custom message to user
Hope it work for you.
Upvotes: 7