After deploying a solution to a site, the "Find an item" search on top of List View Webpart is shown even it was deactivated in source solution.
Configuration in source solution:
List View Webpart property: Display search box
The InplaceSearchEnabled property of XsltListViewWebPart cannot be changed programmatically by CSOM we need for publishing.
As we want to keep understandable behavior of configuration on deployed site, it's not possible to override the ootb functionality in deployed solutions.
These are two workarounds to hide this search input in target sites (deployments).
Option 1: Manual steps after initial deployment
- Set Webpart property Display search box in target site after deployment on each List View Webpart
For sure this is not efficient if you have many deployments and List View Webparts in your solution.
Deployment updates do not set back this property. It keeps the hidden search boxes you set in target sites after updates.
Option 2: Add Content Editor Webpart with styles
- Add a Content Editor Webpart to the page in your source solution where you have List View Webpart with search input
- Add this style to Content Editor Webpart (Edit Source):
- Package and Publish the solution to the target site.
This style hides "Find an item" search inputs on all List View Webpart on the page where it's placed.