Hi @Tom Molskow,Do you want the user to hide the filtering part when using a certain View?
Please try using the spfx extension to change its style to none.
Here is a test for your reference:
Before using the SPFX extension, we need to configure the environment:
Please refer to the link below to create in order:
References:
Setup Environment: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment
Build an extension: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/build-a-hello-world-exte...
Then arrive at the sharepoint page, press F12, open the developer mode, we need to find the class of the part in the page
Here is code:
This will use the setAttribute method to set the element's style attribute to "display: none;", thus hiding the .od-filtersHeader element. to perform styling operations when the page loads and the element becomes available
const canEdit = this.context.pageContext.web.permissions.hasAnyPermissions(SPPermission.manageWeb);
//Obtain permissions, and then judge, if the user does not have editing permissions, the part is display
if (canEdit) {
setInterval(() => {
const element = document.querySelector(".od-filtersHeader") as HTMLElement;
if (element) {
element.setAttribute("style", "display: none;"); // set style "display: none;"
}
}, 100);
}
Copy URL
Put URL in src:
Here is test result:
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.
Best Regards
Cheng Feng