In view,
{
xtype: 'textfield',
fieldLabel: 'Test Field',
name: 'testField'
}
I want to grep that textfield in controller to hook Keyup event.
I tried,
this.control({
'input[name='testfield']' : {
afterrender : function(c){
console.log(c); // nothing happened.
c.getEl().on('keyup', function (evt, el) {
console.log(evt.getKey());
});
}
}
});
but it does not work,
How can I grep that textbox in controller and hook keyup event?
Anybody know, please advise me.
Thanks
it should be
you’ve specified
inputinstead oftextfield.The selectors that you specify in the
this.controlfunction should conform to those accepted byExt.ComponentQuery. Check documentation