Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
w2pext
plugin_dbui
Commits
88e90e5f
Commit
88e90e5f
authored
Oct 30, 2019
by
LE GAC Renaud
Browse files
Update GridWithFilter to add config filterOnChange and to handle it.
parent
bf5ed706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
static/plugin_dbui/src/panel/GridWithFilter.js
static/plugin_dbui/src/panel/GridWithFilter.js
+19
-2
No files found.
static/plugin_dbui/src/panel/GridWithFilter.js
View file @
88e90e5f
...
...
@@ -15,6 +15,13 @@ Ext.define("Dbui.panel.GridWithFilter", {
"
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
filter
:
null
,
grid
:
null
,
...
...
@@ -35,10 +42,16 @@ Ext.define("Dbui.panel.GridWithFilter", {
// bind the filter to the grid
me
.
filter
=
me
.
selectorPanel
.
child
(
"
xgridfilter
"
);
me
.
grid
=
me
.
mainPanel
.
child
(
"
xgrid
"
);
me
.
filter
.
bind
(
me
.
grid
);
me
.
filter
.
bind
(
me
.
grid
,
me
.
filterOnChange
);
// 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
);
// collapse the selectorPanel
...
...
@@ -57,6 +70,10 @@ Ext.define("Dbui.panel.GridWithFilter", {
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
.
callParent
(
arguments
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment