I basically want my combobox to have the option of searching between two sources, and able to switch between them with a click of a button contained in the footer template. I almost got it working but have some problems. Please see:
I can switch the data source and get the results to display, however the problems are:
1) Button text does not stay changed, if you comment out the .setDataSource() in switch search, then the button text is preserved and switches between Local and Global. But calling .setDataSource() seems to load the template again, though the span accompanying it does not change. I tried setting the footer template in switchSearch with:
widget.footerTemplate = $("#alternativeTemplate").html(); but that didn't work.
2) If I type Kiwi, which has no result in local search, and click Global search to switch data source, the filtering does not apply, even though I would like it to because I have entered something in the textbox already.
How can I make this work? Thanks.