ExtJS removeAll doesn't work
<p>I have detected a weird behaviour of removeAll. I'm using ExtJS 4.2, I don't know if the same happens in other newer versions.
I have this code inside of a tbar of a grid:</p>

<pre><code>{
itemId: 'delete',
text: 'Delete',
iconCls: 'icon-delete',
disabled: true,
handler: function() {
    var selection = this.up('grid').getView().getSelectionModel().getSelection()[0];
    if (selection) {
        var numItems = storeProdutos.data.items.length;
        var store = this.up('grid').getStore();
        if(numItems != 0) {
            // point 2
            Ext.Msg.confirm('Confirm', 'Do you want to delete?', function(button){
                if(button === 'yes') {
                    gridProduto.getStore().removeAll();
                    store.remove(selection);
                    gridProduto.getStore().clearFilter();
                    gridProduto.getStore().load();
                    gridMercado.getSelectionModel().select(0);
                }
            });
        } else {
            store.remove(selection);
            gridProduto.getStore().clearFilter();
            gridProduto.getStore().load();
            gridMercado.getSelectionModel().select(0);
        }
    }
}
}
</code></pre>

<p>When I try to delete it appears the messagebox, and I say yes.<br>
Then it deletes the <em>store.remove(selection)</em> but it doesn't delete the <em>gridProduto.getStore.removeAll()</em>. The weird thing is that in the php delete script everything went successfully.<br>
The most weird thing is that if I put <em>gridProduto.getStore.removeAll()</em> on <strong>point 2</strong> of the code and do everything again, it removesAll successfully!<br>
I believe it has something to do with the messagebox.<br>
Does anyone know how can I fix this?  </p>

<p><strong>PS:</strong> My store has a proxy for deletion with ajax. Something like this:</p>

<pre><code>storeProdutos = Ext.create('Ext.data.Store',{
...
proxy: {
            type: 'ajax',
            api: {
                destroy: '/path/someScript.php'
            }
}
}
</code></pre>