I have created a modern list in SPO with JSON conditional formatting on the row and view levels.
One conditional formatting snippet I've added hides the cell text (row level) based on the current user. But I would like to also hide the column header text as well and cannot figure out how to do this.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"style": {
"display": "=if(@me == '[email protected]','','none')"
}
}
Similarly, I would like to format the column header to have a line break in case the title is long. This could be done with on-premise using CSS but again I have not found a way to do this in JSON. The actual column text can be JSON formatted to break but I can't do it at the column heading level. Simply adding a BR tag or \n\r (or its HTML-encoded equivalent) doesn't do anything.
Any insight would be welcome.