Skip to content

How to wary rendered column data according to condition? #140

@lehtone1

Description

@lehtone1

I noticed that it is possible to do custom rendering for column with ColumnDT("<a href=''>" + User.id + "</a>"). How can I differ how the data is rendered according to a conditional? I would like to do something like this:

ColumnDT(
    if(User.id == 1):
        "<a href=''>" +  User.id + "</a>"
    else:
        User.id
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions