Skip to content
Snippets Groups Projects
Commit 4ec1be2c authored by legac's avatar legac
Browse files

Improve version of the filter making.

It is also disable when the slide value change.
parent cfb262cc
No related branches found
No related tags found
No related merge requests found
......@@ -32,15 +32,6 @@ Ext.define('App.grid.Filter', {
// initialise the base class
this.callParent(arguments);
this.addEvents(
/**
* @event filterchange
* Fires when a field content is modified
* @param {Ext.form.Field} the field that has changed
*/
'filterchange'
);
// associate handlers to fields
this.items.each(function (item) {
......@@ -237,7 +228,6 @@ Ext.define('App.grid.Filter', {
/**
* Handler to catch a change in field value and to filter the store.
* Fires the event #filterchange.
*
* @param {Ext.form.Field} field
* @param {Ext.EventObject} event
......@@ -247,8 +237,6 @@ Ext.define('App.grid.Filter', {
"use strict";
this.fireEvent('filterchange', field);
if (this.grid.remoteAction) {
this.remoteFiltering(field);
......
......@@ -32,12 +32,12 @@ Ext.define('App.panel.GridWithFilter', {
// collapse the selectorPanel
this.selectorPanel.collapsed = true;
// disable the selector (filter) during filtering
this.filter.on('filterchange', function () {
// disable the selector (filter) during filtering and loading operation
this.grid.store.on('beforeload', function () {
this.selectorPanel.disable();
}, this);
this.grid.getStore().on('refresh', function () {
this.grid.store.on('refresh', function () {
this.selectorPanel.enable();
}, this);
},
......@@ -47,11 +47,11 @@ Ext.define('App.panel.GridWithFilter', {
this.resetButton.un('click', this.filter.onReset, this.filter);
this.filter.un('filterchange', function () {
this.grid.store.un('beforeload', function () {
this.selectorPanel.disable();
}, this);
this.grid.getStore().un('refresh', function () {
this.grid.store.un('refresh', function () {
this.selectorPanel.enable();
}, this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment