ZfTable icon indicating copy to clipboard operation
ZfTable copied to clipboard

Row decorators with conditions

Open rodrigo-martinez opened this issue 11 years ago • 2 comments

The renderer of rows is not validating the conditions before calling the decorator. As in the rendered of Cells, an if is needed who ask for the validConditions before calling the decorator.

Beside this, when added a ClassDecorator with conditions, the decorator adds the new class to the class attribute of row, so after that the class is added for every next rows. I don't know the best way to fix this, in the code, I added at the begining of the foreach an assigment to reset the class value.

rodrigo-martinez avatar Dec 31 '14 14:12 rodrigo-martinez

I found the addVarClass that is cleaned after each row rendered. So changing de ClassDecorator instead of using de addClass use the addVarClass

rodrigo-martinez avatar Dec 31 '14 15:12 rodrigo-martinez

This change seems useful, could it be merged?

fzipi avatar Apr 28 '15 14:04 fzipi