pppswing
30 Nov 2010, 8:56 AM
Hello,
I have a listener on keypress that has a weird behavior.
When there is a keypress event, element is filled with the previous value,
so I have the current filter when I'm pressing the next key !
And at the first key press, searched_value is null.
How can I fixed this?
I'm working with ext 3.3
Tks, :)
listeners: {
keypress: {
fn: function(elem, event){
gdm = assignment_panel.getColumnModel();
colums = getAssignementColumns();
searched_value = elem.getValue();
alert(searched_value);
var hide_columns = function(){
for(col in colums){
header_str = colums[col]['header'];
if(!colums[col]['fixed'])
gdm.setHidden(col,(header_str != undefined && header_str.search(searched_value) == -1));
}
};
hide_columns.defer(100);
assignment_panel.view.refresh();
}
}
}
I have a listener on keypress that has a weird behavior.
When there is a keypress event, element is filled with the previous value,
so I have the current filter when I'm pressing the next key !
And at the first key press, searched_value is null.
How can I fixed this?
I'm working with ext 3.3
Tks, :)
listeners: {
keypress: {
fn: function(elem, event){
gdm = assignment_panel.getColumnModel();
colums = getAssignementColumns();
searched_value = elem.getValue();
alert(searched_value);
var hide_columns = function(){
for(col in colums){
header_str = colums[col]['header'];
if(!colums[col]['fixed'])
gdm.setHidden(col,(header_str != undefined && header_str.search(searched_value) == -1));
}
};
hide_columns.defer(100);
assignment_panel.view.refresh();
}
}
}