SharePoint online - how to widen width of column within grouped item in an FAQ list?

Vanessa 351 Reputation points
2023-10-11T16:51:00.64+00:00

I am using a custom list and the group by function to create an FAQ. The Answer column is narrow. I am using the following JSON code to have the multiline Answer column display complete answers regardless of the number of lines. So, all the lines display, even in long answers, but the column is narrow. Note that the Title column is used for the question.

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

I am using the following to format the view so that column headers and number of items are not visible

{   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",   "hideColumnHeader": true,   "hideSelection": true,   "groupProps": {     "headerFormatter": {       "elmType": "div",       "txtContent": "@group.fieldData",       "attributes": {         "class": "sp-row-title ms-fontSize-xl"       }     }   },   "additionalRowClass": "ms-font-l ms-fontColor-neutralPrimary ms-bgColor-white--hover" }

Thanks.

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,364 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
{count} votes

Accepted answer
  1. Emily Du-MSFT 44,311 Reputation points Microsoft Vendor
    2023-10-12T07:21:49.8266667+00:00

    For the original post, I understand that you want to show all text lines and widen the Answer column.

    This is a known limitation of JSON formatting. You cannot widen the column by using JSON formatting in the SharePoint Online.

    To widen the column, try this:

    1.Grag the right edge of Answer column header.

    2.Click the dropdown of All Items -> Save view as -> All Items -> Save.

    1


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful