View Full Version : [FIXED] Store.Remove(record) w/filter applied doesn't remove a record that's filtered out

22 May 2015, 1:38 PM
I have a view, with a store that has a filter applied. In this scenario, the filter has filtered my record out of the current view. I then call store.remove(record) and the record remains in the store.

I can call store.getData().getSource() and see the record that I thought I had just removed.

In Ext.data.store.remove, I wonder if the following change should be made (my change in red, the comment shows the original line):

* Removes the specified record(s) from the Store, firing the {@link #event-remove}
* event for the removed records.
* After all records have been removed a single `datachanged` is fired.
* @param {Ext.data.Model/Ext.data.Model[]/Number/Number[]} records Model instance or
* array of instances to remove or an array of indices from which to remove records.
remove: function(records, /* private */
isMove, silent) {
var me = this,
data = (me.getData().getSource() || me.getData()), //This was previously data = me.getData(),
len, i, toRemove, record;

Gary Schlosberg
26 May 2015, 5:29 AM
Thanks for the report. Can you please post a test case which reproduces the issue you are reporting?

26 May 2015, 11:02 AM

After 1.5 seconds, the code filters the list, removes Don, and clears the filter. In Touch 2.4.1, Don is removed. In Modern FW on Ext6, Don is not removed.

27 May 2015, 10:45 AM
Note: Tried this on the Beta, still the same result.

1 Jun 2015, 12:27 PM
Can we get this defect opened? Been stuck here for a bit now without a response, even though I provided a sample.

Gary Schlosberg
1 Jun 2015, 2:26 PM
Apologies for the delay, and thanks for the report! I have opened a bug in our bug tracker.

16 Mar 2016, 3:58 AM
Guys, how about applying the same fix to removeAll?

Gary Schlosberg
16 Mar 2016, 4:17 PM
Thanks for pointing that out. That issue being handled on this thread.