How to set default color for column?
Asked Answered
A

1

6

Tabulator has builtin formatter color

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

something like:

columns: [
  { width: 50, color: "red" },
]
Aniakudo answered 5/1, 2019 at 10:59 Comment(0)
Z
8

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;
}
Zita answered 5/1, 2019 at 16:3 Comment(2)
This will change color of all cells, I need cells only at curtain columnAniakudo
example updated to include column specific highlightingZita

© 2022 - 2024 — McMap. All rights reserved.