Consider the following example class Parent
:
Ext.define('Parent', {
...
listeners: {
render: {
fn: doSomething
},
},
};
and the following class Child
extending default Parent
above:
Ext.define('Child', {
extend: 'Parent',
...
listeners: {
afterrender: {
fn: doSomething
},
},
};
Even though Child
does not specify a listener for render
(it only provides for afterrender
) the render
listener (defined in the Parent
class) is not fired anymore upon Child
's component rendering; i.e. the listener is overwritten by the new listeners specification.
How to fix this?