waningflow/vue-virtual-table

How I can add class to row?

Closed this issue · 1 comments

I need conditionally give color to some rows.
Could you please advise how to do this?

Unfortunately adding class to row is not supported now. But you can add class to a single cell conditionally.
For example, in example/complexTable.vue

{
  prop: "budget",
  name: "Budget",
  sortable: true,
  summary: "SUM",
  prefix: "$",
  eClass: { warningColor: "${daily_budget}<${spend}" },
  numberFilter: true
}

Thus you can add eClass to all items of config.
The warningColor will be the className that you can define in you component.

.warningColor{
    background-color: lightblue;
}