鉴于,
{
   xtype: 'textfield',
   fieldLabel: 'Test Field',
   name: 'testField'
}
我想 grep 控制器中的文本字段来挂钩 Keyup 事件。
我试过,
this.control({
  'input[name='testfield']' : {
     afterrender : function(c){
        console.log(c); // nothing happened.
        c.getEl().on('keyup', function (evt, el) {
                console.log(evt.getKey());
        });
     }
  }
});
但它不起作用,
如何在控制器中 grep 文本框并挂钩 keyup 事件?
有谁知道,请指教。
谢谢