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 AllenDec 12, 2017Iron Contributor
So, I should have stated yesterday that it was the "Title" column where this is not persisting.
(In this doclib, Title is only a line of text, no link to edit, etc.)
In other columns, working fine.
Deleted; jcgonzalezmartin
- DeletedDec 12, 2017
Owen, yes looks like you are right ... all other columns seem to work, just not the title column.
- Owen AllenDec 12, 2017Iron Contributor
And in another tenant, the new doclib has a "Name" column, and it works fine there.
I can't get a "Title" column in a new doclib. This is a migrated doclib that still has a TItle column - perhaps there is some artifact that persisted there. But there must be a lot of doclibs that have both "Title" and "Name" still out there. - let's hope it's still worth a fix for "Title".? Or, maybe I can be told what I need to clear out of this doclib.
Thanks,
Owen
- DeletedDec 12, 2017
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...?