Forum Discussion
Sharepointnoob
Mar 27, 2024Copper Contributor
How to disable the second scrollbar on a modern sharepointpage with a list in it?
I have a Sharepoint online page where you can see a long list. My client did not like that on the right you can see 2 vertical scrollbars. I told them one is for the page and the other one is for the...
Sharepointnoob
Mar 28, 2024Copper Contributor
I have a SharePoint list with a custom formatted view created using JSON formatting. Is it possible to modify the JSON code to remove the vertical scrollbar from this view? I attempted to add the following code for this purpose, but it didn't work:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "hide-vertical-scrollbar"
}
Could you provide guidance on how to achieve this?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "hide-vertical-scrollbar"
}
Could you provide guidance on how to achieve this?
ganeshsanap
Mar 28, 2024MVP
Can you share current JSON used for list view formatting?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- SharepointnoobMar 28, 2024Copper ContributorOfcourse, here it is:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "hide-vertical-scrollbar",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "div",
"style": {
"display": "flex",
"padding": "5px",
"margin-bottom": "5px",
"margin-right": "100px",
"width": "90%"
},
"children": [
{
"elmType": "div",
"children": [
{
"elmType": "div",
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover"
},
"style": {
"display": "block",
"font-size": "18px",
"font-weight": "500",
"padding-bottom": "0px",
"padding-top": "0px",
"text-decoration": "none",
"text-overflow": "ellipsis",
"white-space": "normal"
},
"txtContent": "=[$Title]"
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"white-space": "normal",
"overflow": "hidden",
"text-align": "left"
},
"txtContent": "=[$Description]"
}
]
}
]
}
}- ganeshsanapMar 28, 2024MVP
Sharepointnoob Can you try using this once?
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "style": { "display": "flex", "padding": "5px", "margin-bottom": "5px", "margin-right": "100px", "width": "90%", "overflow": "hidden" }, "children": [ { "elmType": "div", "children": [ { "elmType": "div", "attributes": { "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover" }, "style": { "display": "block", "font-size": "18px", "font-weight": "500", "padding-bottom": "0px", "padding-top": "0px", "text-decoration": "none", "text-overflow": "ellipsis", "white-space": "normal" }, "txtContent": "=[$Title]" }, { "elmType": "div", "style": { "font-size": "14px", "white-space": "normal", "overflow": "hidden", "text-align": "left" }, "txtContent": "=[$Description]" } ] } ] } }
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- SharepointnoobApr 02, 2024Copper ContributorDo you know any other way to do this?