Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 88e90e5f authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update GridWithFilter to add config filterOnChange and to handle it.

parent bf5ed706
...@@ -15,6 +15,13 @@ Ext.define("Dbui.panel.GridWithFilter", { ...@@ -15,6 +15,13 @@ Ext.define("Dbui.panel.GridWithFilter", {
"Ext.LoadMask" "Ext.LoadMask"
], ],
/**
* @cfg {Boolean}
* Filter the grid as soon as one field of the selector is changed
* otherwise when the Go button is pressed
*/
filterOnChange: false,
// private short cuts // private short cuts
filter: null, filter: null,
grid: null, grid: null,
...@@ -35,10 +42,16 @@ Ext.define("Dbui.panel.GridWithFilter", { ...@@ -35,10 +42,16 @@ Ext.define("Dbui.panel.GridWithFilter", {
// bind the filter to the grid // bind the filter to the grid
me.filter = me.selectorPanel.child("xgridfilter"); me.filter = me.selectorPanel.child("xgridfilter");
me.grid = me.mainPanel.child("xgrid"); me.grid = me.mainPanel.child("xgrid");
me.filter.bind(me.grid); me.filter.bind(me.grid, me.filterOnChange);
// connect buttons // connect buttons
me.goButton.hide(); if (me.filterOnChange) {
me.goButton.hide();
} else {
me.goButton.on("click", me.filter.onGo, me.filter);
}
me.resetButton.on("click", me.filter.onReset, me.filter); me.resetButton.on("click", me.filter.onReset, me.filter);
// collapse the selectorPanel // collapse the selectorPanel
...@@ -57,6 +70,10 @@ Ext.define("Dbui.panel.GridWithFilter", { ...@@ -57,6 +70,10 @@ Ext.define("Dbui.panel.GridWithFilter", {
var me = this; var me = this;
if (!me.filterOnChange) {
me.goButton.un("click", me.filter.onGo, me.filter);
}
me.resetButton.un("click", me.filter.onReset, me.filter); me.resetButton.un("click", me.filter.onReset, me.filter);
me.callParent(arguments); me.callParent(arguments);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment