Forum Discussion
iDrive
Feb 26, 2019Copper Contributor
List Web Part Expand/Collapse View Broken on Modern Site Page
When attempting to display a list view on a SharePoint Online Modern Site Page for FAQ questions and answers the Answer field (multiple lines of text) is not displaying the values. In the examples be...
tgjerdahl
May 30, 2020Copper Contributor
iDrive Has a solution been found for this? I'm having the same problem.
- iDriveJun 03, 2020Copper Contributor
tgjerdahl and hazza365, I just tested this out again and it is now working on a test page. With that said, it wasn't working when we needed it and the solution I came up with was a custom formatted list view based off the PnP Bulletin Board list view https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples/bulletin-board-format.
Example of my custom list view:
My custom list view JSON:
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideListHeader": true, "hideSelection": true, "rowFormatter": { "elmType": "button", "customRowAction": { "action": "defaultClick" }, "attributes": { "class": "ms-bgColor-white ms-bgColor-themeLight--hover" }, "style": { "width": "100%", "margin": "5px 0", "padding": 0, "border": "none", "cursor": "pointer" }, "children": [ { "elmType": "div", "attributes": { "class": "ms-borderColor-themePrimary ms-bgColor-themePrimary" }, "style": { "min-width": "auto", "display": "flex", "border-width": "3px", "border-style": "solid", "box-sizing": "border-box", "align-items": "center" }, "children": [ { "elmType": "div", "attributes": { "iconName": "Unknown", "class": "ms-fontSize-su ms-fontWeight-regular ms-fontColor-white", "title": "Question" }, "style": { "flex": "none", "padding": "6px", "padding-left": "10px", "height": "42px" } } ] }, { "elmType": "div", "attributes": { "class": "ms-fontColor-themePrimary ms-borderColor-themePrimary ms-fontWeight-semibold ms-fontSize-l" }, "style": { "border-width": "3px", "border-style": "solid", "box-sizing": "border-box", "width": "100%", "text-align": "left", "padding": "15px 5px", "overflow": "hidden" }, "children": [ { "elmType": "div", "txtContent": "[$Title]", "style": { "height": "24px" }, "attributes": { "title": "Click to view answer" } } ] } ] } }