-
Notifications
You must be signed in to change notification settings - Fork 10
Data source
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. |