Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Corrected example - removed manual refiltering.

Store add() and load() auto-refilter the store now,
manual filtering no more needed.
  • Loading branch information...
commit 7209968070e8d15d499c279217ce281dfdf79f74 1 parent 698bd02
@nene authored
Showing with 0 additions and 16 deletions.
  1. +0 −16 local-example.js
View
16 local-example.js
@@ -78,36 +78,20 @@ Ext.onReady(function() {
title: 'Filtering with local store',
renderTo: "local-grid-container",
bbar: [
- // FilterRow doesn't solve the issue that new records added to
- // filtered store will not get filtered. But it gives you
- // access to the current filtering function, which you can then
- // use to implement the reloading and adding.
{
text: "Reload",
handler: function() {
- // after store is reloaded, reapply the filter
- store.on("load", function() {
- store.filterBy(filterRow.getFilterFunction());
- }, this, {single: true});
-
store.load();
}
},
{
text: "Add",
handler: function() {
- // Before adding you have to clear filters, otherwise
- // strange things can happen.
- store.clearFilter();
-
store.add(new Company({
company: "Google Inc",
price: 150.7,
change: "up"
}));
-
- // after adding, reapply the filter
- store.filterBy(filterRow.getFilterFunction());
}
}
]
Please sign in to comment.
Something went wrong with that request. Please try again.