Skip to content

VDataTable coloring of individual cells #26

@DrAkustik

Description

@DrAkustik

Hi!

I want to create a VDataTable and to color individual cells. I managed to color individual rows:

    with vuetify.VDataTableVirtual(
        classes="justify-center align-center",
        density="compact",
        fixed_header=True,
        hover=True,
        headers=("header", []),
        items=("data", []),
    ):
        with vuetify.Template(v_slot_item="slotData"):
            vuetify.VDataTableRow(
                v_bind="slotData.props",
                classes=("{'bg-warning': slotData.item.column_name== 'condition1', 'bg-success': slotData.item.column_name!= 'condition2'}",)
            )

As I found out, vuetify provides the functionality to use a template for individual columns by using v-slot:item.key. Is there also a way in trame to access an individual key in a VTemplate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions