Can i set column width for all views

New Contributor

Hi, i've got a lot of views from a library and want to set the column width to all the file name is viewed, not just the first few words...

 

I'v been playing with JSON but don't have a clue really..

 

 

I've managed to wrap the text to make it easier to view but it's still defaulting to a narrow column. Any ideas how to make it as wide as the longest file name or just a set width??

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "div",
  "txtContent": "@currentField",
  "style": {
    "white-space": "normal",
    "padding": "10px 0"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary"
  }
}

 

0 Replies