Skip to content
Anders Malmgren edited this page Jul 4, 2014 · 2 revisions

You can use a array as data source and let the combobox do the filtering client side, or you can use function as source.

The function will take a options object as argument, this object has the following members

Member Function
page Current page
pageSize Number of rows to return
text The text that was entered in the combo
callback You can either choose to use this callback or return a promise from your data source function

THe callback expects a object with two members

Member Function
data An array of items
total The total number of items for the current filter, you only need to supply total when page is zero, this way you only need to ask your DB for count when a new search text is entered.

Promise demo

http://jsfiddle.net/AWHhr/49/

Clone this wiki locally