SharePoint Online_How to hide view dropdown in command bar in list webpart

Copper Contributor

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?

 

MHarper74_0-1689186483647.png

 

3 Replies
You 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

@CHIRAGGULATI 

 

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.

@MHarper74 Unfortunately you can not hide using OOTB functionality. You have to use SPFX to hide "Switch View Options".

KotiReddy_0-1689244068689.png

 


Below explained how to do.
https://techcommunity.microsoft.com/t5/sharepoint/how-to-hide-switch-view-option-in-sharepoint-onlin...