[pve-devel] [PATCH pve-manager 1/2] use 'refresh' event to reload the grid after filtering the store

Emmanuel Kasper e.kasper at proxmox.com
Tue Feb 16 16:14:13 CET 2016


'datachanged' event was not reloading the store with ExtJS5,
but 'refresh' does.
According to the API description 'refresh' seems to be what we need:
http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.data.AbstractStore-event-refresh

also remove deprecated readme ( ExtJS6 do not have the 'chunking' Grid Feature, and no bugs
seen in scrolling yet)
---
 www/manager6/grid/ResourceGrid.js | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/www/manager6/grid/ResourceGrid.js b/www/manager6/grid/ResourceGrid.js
index e638ec1..4de24f8 100644
--- a/www/manager6/grid/ResourceGrid.js
+++ b/www/manager6/grid/ResourceGrid.js
@@ -2,9 +2,6 @@ Ext.define('PVE.grid.ResourceGrid', {
     extend: 'Ext.grid.GridPanel',
     alias: ['widget.pveResourceGrid'],
 
-    //fixme: this makes still problems with the scrollbar
-    //features: [ {ftype: 'chunking'}],
-    
     title: gettext('Search'),
 
     initComponent : function() {
@@ -137,7 +134,7 @@ Ext.define('PVE.grid.ResourceGrid', {
 
 	    store.resumeEvents();
 
-	    store.fireEvent('datachanged', store);
+	    store.fireEvent('refresh', store);
 
 	    //console.log("END GRID UPDATE");
 	};
-- 
2.1.4





More information about the pve-devel mailing list