How to hide the complete commandbar props in a list

Devidasan Nirmala 31 Reputation points
2022-07-29T11:52:39.067+00:00

I have been trying to check if there are ways to hide the complete command bar for a list.
![226018-image.png][1]

I found there it is possible using JSON syntax - https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting. (there was no mention of how to hide Switch view options, Filter pane - no corresponding key names)

But what would like to know is if there is a way to hide complete command bar instead of the JSON to specify individually hiding each key.

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"commandBarProps": {
"commands": [
{
"key": "new",
"hide": true
},
{
"key": "editInGridView",
"hide": true
},
{
"key": "share",
"hide": true
},
{
"key": "export",
"hide": true
},
{
"key": "automate",
"hide": true
},
{
"key": "alertMe",
"hide": true
},
{
"key": "integrate",
"hide": true
},
{
"key": "manageAlert",
"hide": true
}
]
}
}

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Xuyan Ding - MSFT 7,601 Reputation points
    2022-08-01T02:37:25.247+00:00

    Hi @Devidasan Nirmala

    Per my test, there is currently no exact way to hide the complete command bar. But you could hide the command bar in the list web part without code execution.
    Edit the list web part in the page and open the "Hide command bar" option.
    226553-microsoftteams-image-5.png


    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 comments No comments

  2. Devidasan Nirmala 31 Reputation points
    2022-08-01T05:29:14.873+00:00

    Hi , thanks for the answer. In this case, we have use iframe to embed the list in the home page as the list actions are liked to Power Automate flows. Hence the above settings is not available in this context to hide the command bar.

    I found there it is possible using JSON syntax - https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting. (there was no mention of how to hide Switch view options, Filter pane - no corresponding key names)

    But what would like to know is if there is a way to hide complete command bar instead of the JSON to specify individually hiding each key for this case.

    Thank you.


  3. Nirmala D 1 Reputation point
    2022-08-03T11:40:25.727+00:00

    Hi, thanks for your support.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.