llamerr
2 Jun 2016, 5:57 AM
There's already this thread https://www.sencha.com/forum/showthread.php?103275-Add-listeners-to-preconfigured-class&p=484276#post484276
My question is - why listeners from defaults still (after 5-6years) aren't merged automatically with other listeners?
xtype: 'form',
defaults: {
listeners: {
specialkey: function( field, e ) {
if ( e.getKey() == e.ENTER && field.isValid() && !me.queryById('acceptBtn').disabled ) {
me.fireEvent('accept');
me.close();
}
}
}
},
items: [
....
{
xtype: 'textfield',
listeners: {
change: function( field ) {
...
My question is - why listeners from defaults still (after 5-6years) aren't merged automatically with other listeners?
xtype: 'form',
defaults: {
listeners: {
specialkey: function( field, e ) {
if ( e.getKey() == e.ENTER && field.isValid() && !me.queryById('acceptBtn').disabled ) {
me.fireEvent('accept');
me.close();
}
}
}
},
items: [
....
{
xtype: 'textfield',
listeners: {
change: function( field ) {
...