PDA

View Full Version : Ext.grid.Panel blur event not firing



getbogged
29 Sep 2014, 7:03 AM
I have a grid with values and it seems other events fire but not my blur event doesn't fire. Clicking on the cells will output 'click el' but selecting my grid and clicking anywhere else on the page does not fire the blur event. I have used the same type of blur event on a combo box and it triggers the event. I removed that combobox from my page to test this grid's blur event and it still does not trigger.

I also tried in console Ext.getCmp('myGrid').fireEvent('blur') and get a return of true but no output to console. What am i doing wrong here?

I have also tried setting the listeners by



listeners:{
blur: function(a,b,c){
//some code
}
}





var leagueListPanel = Ext.create('Ext.grid.Panel', {
title: 'League',
store: store,
columns: [
{ header: 'League Name', dataIndex: 'leaguename', flex: 1, tooltip: 'Click to Manage'},
{ header: 'Teams', dataIndex: 'email'},
{ header: 'Updates', dataIndex: 'phone' },
{ xtype: 'actioncolumn', header: 'View', width: 65}
],
width: width,
height: height,
dockedItems: [{
xtype: 'pagingtoolbar',
store: store, // same store GridPanel is using
dock: 'bottom',
displayInfo: true
}],
renderTo: 'myleagues',
listeners: {
cellclick: {
fn: function(){ console.log('click el'); }
},
blur: {
fn: function(){ console.log(' blur event '); }
}
}
});


edit: adding version number
versions: Objectcore: Ext.Version.Ext.extend.constructorbuild: 883major: 4minor: 2patch: 1shortVersion: "421883"version: "4.2.1.883"

slemmon
30 Sep 2014, 10:01 PM
Hi,

This is probably an idiosyncrasy of the API docs more than anything. The blur event is inherited from AbstractComponent so it shows on the list of events in the API docs, but isn't fired as the component (unlike combobox and other fields) is not a focusable component.

getbogged
1 Oct 2014, 6:10 AM
Ah ok. Thanks. I will look for another solution then.