Forum Discussion
MHarper74
Jul 12, 2023Copper Contributor
SharePoint Online_How to hide view dropdown in command bar in list webpart
I have a list view in a list webpart and we need to hide the view dropdown and the info button in the command bar....see below. What is the best way to accomplish this?
3 Replies
Sort By
- KotiReddyCopper Contributor
MHarper74 Unfortunately you can not hide using OOTB functionality. You have to use SPFX to hide "Switch View Options".
Below explained how to do.
https://techcommunity.microsoft.com/t5/sharepoint/how-to-hide-switch-view-option-in-sharepoint-online/m-p/3679306 - CHIRAGGULATICopper ContributorYou can do it by formatting the view only. It won't be applicable to the whole list, just a particular view which you have created. I would suggest not to hide the view drop down since the users/owners won't be able to switch between the views.
You would require knowledge of JSON, owner level access and name of the elements which you want to hide to perform the changes.
Sharing the link of a YouTube video for your reference.
https://www.youtube.com/watch?v=Vawwaz2Mle8
Hope it helps- Mharper741070Copper Contributor
Hello
Thanks for the quick response........I do not want users switching to other views. The requirement is to hide the views dropdown from the command bar.