View Full Version : [2.2][CLOSED] Combobox 'change' event fires diffently from "classic" select
Tonio
14 Aug 2008, 4:48 AM
Hello,
'change' event is fired by a combobox after it lose its focus, whereas normal select fires it on a click on a option.
You can't have the same behavior than "normal" select without hacking, it seems to :
http://extjs.com/forum/showthread.php?t=42988&highlight=combobox+change+event
For me, it's definitively a bug. Don't you think ?
Thanks,
Tonio
evant
14 Aug 2008, 5:20 AM
The standard behaviour for Ext form components is to fire the change event once the field loses focus.
Why do you think this is a bug?
Condor
14 Aug 2008, 5:30 AM
You are looking for the 'select' event.
Tonio
14 Aug 2008, 5:35 AM
'cause for me it's an unconsistent behavior that :
Ext.get('dpt').on('change', function(){
if (this.getValue()!=0)
dptStore.load({ params: { dpt: this.getValue() } });
});and
new Ext.form.ComboBox({
transform: 'dpt',
triggerAction: 'all',
listeners: {
'change': function(){
if (this.getValue()!=0)
dptStore.load({ params: { dpt: this.getValue() } });
}
}
});doesn't fire the 'change' event at the same time.
I can't reproduce the first behavior with an combobox, or I just missed something ? (that's possible, I'm new to extjs)
thanks,
Tonio
Tonio
14 Aug 2008, 5:38 AM
Oops, cross-posts...
Thanks a lot, Condor. That works.
I just find strange than that's a different event name, but nevermind, works now.
Thanks.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.