combo local search

Hi,

I have a questions related to combo component. I have the following code:

{
                view: "combo",
                label: 'Country',
                options: 'rest->/country/'
}

My server side /country/ URL returns JSON with around 200 countries (which is the complete list). Now my problem is:

when I click into edit field and start typing “Unite…” combo component is sending more GET /country/ requests to the server. What I would need instead is for combo to filter already loaded list and show only values which start with Unite string.

Any suggestions how to achieve the above appreciated.

Hi,

please try use custom options/suggest configration:

view: "combo",
label: 'Country',
options: {
   body: {
       url:'rest->/country/'
   }
}

Thank you. This works. Is there any documentation I missed which would describe the above trick ?

Sorry. There were too little detail in my reply.
In case of Combo and Richselect, “options” property applied the same functionality as “suggest”. And here are docs for “suggest” customization:

http://docs.webix.com/desktop__suggest.html#customizingsuggestlist

We are going to implement dataFeed option for Combo that will allow to disable server-side search a simpler way.

Is there a way to use the custom options/suggest config using declarative HTML?

It can be done with the help of aconfig tag:

http://webix.com/snippet/89a01554