Thank you for reporting this bug. We will make it our priority to review this report.
Sencha Premium Member
[3.3] ActionColumn behavior/configuration sort of weird
Hi, it's me again,
I was very happy to see the ActionColumn as an official part of ExtJS now, but it seems that it is not as easy as I thought to have it configured and used correctly.
BTW: The documentation for the getClass config is very confusing: You should really indent the parameters for this function correctly because css and attr are not arguments, but properties of the metadata argument!
OK, back to topic.
I wanted to use an ActionColumn as a status indicator, so I chose to use the mentioned getClass config to return an icon class depending on a specific field in each record. But why is the CSS class I return from this function applied to the image inside the column? That does not work for me! So if I want to re-use my CSS icon classes I have to apply the CSS class to the td that contains the div (Ext doesn't give me any other possibility). But this is not exactly brilliant either, because there is only one td per ActionColumn. So why can't I reach the div?
Another problem: The parameter v of the getClass function should be the value of the corresponding field. But when I use the value, it's an empty string. If I use the record parameter instead, the value returned from the record is correct. In this case the field is an integer, but I set the dataIndex config value correctly. So I don't know what I'm doing wrong.
Does anyone experience something like this, too?
It shows the icons now. The work-around for me is to set width and height of the image, too. So I return not only a CSS class that sets the background-image, I return two classes - image class and a class which sets the size to 16*16. I don't know if this is intended behavior - this is not necessary in any other place...
I did think the implementation of the ActionColumn was a little clunky. Using image tags as opposed to going with a span with a background hurts theming and such. I don't think I would classify this as a bug so much as being a suggestion for a later version of ActionColumn.