ClassName as a function!

ClassName as a function!

FurburgerFurburger Posts: 36Questions: 8Answers: 0

Would it be possible to modify the className so it has a function option?

This would create tremendous flexibility.

Instead of this:

className: "text-right"

We could do something like this:

                    className: function render(data) {

                        return data.amount ? "text-right" : "text-center";

This is a trivial example, but I have a number of more complex use cases where this would be very helpful.

Would it be possible?


  • allanallan Posts: 53,103Questions: 1Answers: 8,184 Site admin

    Yes, that could be done - nice idea. The changes would need to be here and here.

    I've filed an internal feature request for this.


  • beneiftzbeneiftz Posts: 1Questions: 0Answers: 0

    any update on this one please?

  • colincolin Posts: 10,563Questions: 0Answers: 1,779

    No, it's still in the same state (for my reference, this is DD-1347). We'll report back here when there's an update.



Sign In or Register to comment.