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?

Replies

  • allanallan Posts: 52,170Questions: 1Answers: 7,941 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.

    Allan

  • beneiftzbeneiftz Posts: 1Questions: 0Answers: 0

    any update on this one please?

  • colincolin Posts: 9,165Questions: 0Answers: 1,532

    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.

    Cheers,

    Colin

Sign In or Register to comment.