Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
new Ext.grid.column.Check()
Hello, I use to do it on ext 6.0.1:
Code:
{
xtype: 'checkcolumn',
header: 'Visualizar',
dataIndex: 'read',
flex: 1,
menuDisabled: true,
renderer: function(val, m, rec) {
if (rec.get('leaf')){
return (new Ext.ux.CheckColumn()).renderer(val);
} else {
return '';
}
},
listeners: {
beforecheckchange: 'checkReadOnly'
}
}
But now I updraded to 6.2 version and Ext.ux.CheckColumn() doesn't work. Console says cannot read 'updateHeaderState' of undefined. In this case, what is undefined is the config in constructor method of Ext.grid.column.Check.
How can I solve it?
-
Thanks for the report. I don't see Ext.ux.CheckColumn in the docs. Can you please post a test case which reproduces the issue you're seeing?
https://fiddle.sencha.com/#home
-
Sencha User
Ext.ux.CheckColumn, is the alternate name for Ext.grid.column.Check.
If I put Ext.grid.column.CheckI have the same error.
-
You are creating a memory leak by doing that. It's not an appropriate way to do that. Call the column defaultRenderer on the passed instance.
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
Sencha User

Originally Posted by
evant
You are creating a memory leak by doing that. It's not an appropriate way to do that. Call the column defaultRenderer on the passed instance.
Ok, in this case I want to show a checkbox if rec.get('leaf') otherwise hide it.
In the image example, the first line is leaf false, without checkbox.
Can you give me an example how to use defaultRenderer on the passed instance?
CheckColumn.png