I have a store bound to a FilteringSelect component which fetches and populates the filteringselect successfully.
Later I delete some of the options dynamically from the underlying store by using deleteItem method as shown below:
scheduleTypeStore.fetch({query:{id: '*'}, onComplete: function (items) {
for(i = 0; i < items.length; i++){
var item = items[i];
scheduleTypeStore.deleteItem(item);
}
}});
scheduleTypeStore.save();
The drop down options are updated but the last selected option still stays even though it has been deleted. After delete operation, if user selected some another option then he is unable to see this earlier selected option.
Do I need to invoke some method on the FilteringSelect to show the placeholder text when the selected option has been deleted dynamically.
Ok I solved it using dijit.byId(‘myid’).reset();