Forum Discussion
Column formatting now rolling out to first release users
Column formatting with JSON works great (I'm only trying to word wrap long titles), but as soon as I close the JSON code text box, the formatting is lost - I can't get the code to persist, either when I apply it from the column in the view, or from the Library settings page.
Is there a trick or a default setting I need to unwind in order for the code to be persisted?
This is the simple JSON code I'm using.
{
"elmType": "div",
"txtContent": "@currentField",
"style": { "white-space" : "normal" }
}
Thanks,
Owen
Owen, that actually worked for me in lists and I was trying to do that, so thanks. Ps. Just copied and pasted your code :) Will try in Document library to see if that works also.
- DeletedDec 12, 2017
Yep worked their also.
I just clicked the preview first, then save. and the code was still there when I came back to it.
- Owen AllenDec 12, 2017Iron Contributor
Cool. It's not the code - (I don't think) - it worked for me in Preview, and when I hit save, and as long as I kept the little code window open, I could change the sort, scroll the view, etc. But, as soon as I closed the code window, the column went back to not being wrapped.
Strange and unexpected, I know. I was kind of hoping that LincolnDeMaris or one of his awesome mighty minions might have seen this before...?
- Dec 12, 2017In my tests, it has worked as expected