The problem here is just a slight misunderstanding of how the FilteringSelect
(and anything that inherits from _AutoCompleterMixin
) interacts with its data. Regardless of how you are creating the FilteringSelect
widget, the underlying mechanism for controlling its options is an object that adheres to the Dojo Store API.
This means that in order to modify your FilteringSelect
widget's options, you need to interact with this store
instead. I've set up this fiddle to demonstrate, but basically you want to change your function to something like:
function showTablesDropDown(tableDiv){
var filteringSelectWidget = dijit.byId(tableDiv);
// Clear current value since options are changing.
filteringSelectWidget.set("value", "");
var store = filteringSelectWidget.get("store");
var newData = [{label: "None", value: "None"}];
// Give the underlying store a new data array.
store.setData(newData);
}