bluerogue
bluerogue

Reputation: 1

Adding "No data found" message on Kendo Autocomplete with AngularJS

I'm new to Kendo UI and I apologize if this is a simple question, but I am working on a site that has search functionality that uses AutoComplete to show possible results. But when there are no matches the list simply goes away, and I need there to be a message that says there are no more matches in place of that list.

I did not write the majority of this code, but all I can find associated with it is this in HTML:

input kendo-auto-complete style="width:100%" ng-model="vm.search" k- k-data-source="vm.searchList" />

I've checked the Kendo site and there seem to be options to help with my issue, but I don't know how to implement them with AngularJS involved.

Upvotes: 0

Views: 1897

Answers (2)

sendreams
sendreams

Reputation: 389

your can find the solution in this post:

Add new Item with AngularJS

Upvotes: 0

Philipp
Philipp

Reputation: 1894

Basically all options you can find on the KendoUI docs can be converted to be usable with AngularJS. (Reference)

In your case the desired option is called noDataTemplate. To use this configuration in HTML you have to convert it from camelCase to be dash-seperated and prefix it with k-.

The result should look like this: k-no-data-template.

Complete sample in HTML:

<input kendo-auto-complete k-data-source="data" k-no-data-template="'No Data available!'" />

Upvotes: 1

Related Questions