On modern SharePoint, I have a page with list web part showing a view of a list on that site. I would like users to be able to create new items using the 'New' button which shows with the command bar enabled. But that also allows user to go through the other views via selection menu that appears at the right side of the command bar.
I've tried JSON commands and seen code to hide/unhide the other elements of command bar (e.g'edit in grid view', 'Share', 'Export to Excel' etc), but haven't found what hides the view selector dropdown. Tried searching online and seems it may not be possible to remove that feature if command bar is enabled. Hoping someone here has an answer.
