I have a store filled on application init.
It is used in multiselect combobox in a view where I select records that I want and add their id's to a variable.
In grid I have a combobox with the same store, and I want to filter out store so it only contains the id's I have selected.
setViewData : function(dataStore, record, readOnly) {
var store = Ext.getStore('ScaleStore');
store.clearFilter();
store.filterBy(function (scaleRecord) {
Ext.each(record.data.scaleList, function (scale) {
if(scale.id == scaleRecord.data.schl1NrId) {
return true;
}
});
});
}
The store contains 5 records.
record.data.scaleList - here I have lets say 3 records out of 5 I have selected in the multiselect combobox.
My goal is to have only the ones I have selected(3 out of 5) displayed in the grid combobox. With this code I get all of the records, or wrong ones at random.
Any pointers to what I am doing wrong here?
Thank you all :)