Where to find search component in forcecommunity?

Where to find search component in forcecommunity?

When a search component implements the forceCommunity:searchInterface interface—which is what we’ll do here—it becomes available for use in any theme layout component that includes a search region. In the Theme | Theme Settings area of Experience Builder, you simply select the available component from the Search Component dropdown.

How to create drag and drop search component?

Create a page to contain the drag-and-drop component and display the list of returned records. In Experience Builder, click on the top toolbar and then click New Page. Select Standard Page. Select 1 full-width column as the content layout for the page and click Next.

How to build a custom search component unit?

Code Highlights This code uses a component and includes a click handler. It also includes an attribute called searchText to contain the search text and uses a component (instead of ) to bind the values. Save customSearch.cmp.

How to change search component in Salesforce trailhead?

To switch to the new search component, open Theme | Theme Settings, and then select Cloud Kicks Search in the Search Component dropdown. Tip You can also go to Settings | Theme | Configure and click beside the theme layout to edit its properties and select the search component.

How to create custom search component unit in Salesforce?

Implement the searchForIds method by replacing the class contents with this code. Code Highlights: The searchForIds method takes a String searchText and returns a list of strings representing found IDs. For now, we just return the search string itself. Save CustomSearchController.apxc.

How to create customsearchresultslist component in Salesforce?

To open the customSearchResultsList component’s controller method, click Controller on the right-hand side of the Developer Console. Replace the controller contents with this code. Code Highlight: In this code, you’re relying on the record ID list to be passed to the component from the browser’s session storage.

How to create search query in Salesforce apex?

Let’s use the Salesforce Object Search Language (SOSL) in our Apex class to create a query that finds objects whose fields contain the input search text. Use the SOSL to construct text-based search queries against the search index.