Eugen Konkov
Eugen Konkov

Reputation: 25113

How to set default color for column?

Tabulator has builtin formatter color

Is there a way to set default column color (for all cells)?

something like:

columns: [
  { width: 50, color: "red" },
]

Upvotes: 6

Views: 1929

Answers (1)

Oli Folkerd
Oli Folkerd

Reputation: 8348

There is no default way to do that built in to the formatter, but you could just use simple CSS to set the background color of cells in a column with a given field name

.tabulator .tabulator-row .tabulator-cell[tabulator-field="fieldname"]{
    background-color:red;
}

Upvotes: 8

Related Questions