function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Filter results for LWC that includes a search field

Within the LWC, there exists a search field which displays properties for the user to select. The html file contains the following: 

<lightning-layout multiple-rows class="slds-var-p-bottom_small">
                <lightning-layout-item size="4">
                            label="Search Properties"

which is dictated by the following in the js file as follows:

handleSearch(event) {
    const searchFields = ['name', 'propertyId', 'address'];
      .search(, searchFields);

Question: The properties that are returned have a status of either ACTIVE or INACTIVE. However, the requirement is for the properties to return ones ONLY with the status of ACTIVE (filter for only ACTIVE status on the record and exclude those of INACTIVE status). 

Where would I navigate to edit the filter to make the update to accomplish this?


SwethaSwetha (Salesforce Developers) 
How is the c-datatable component structured? Is it a custom component, and does it have a method like search or updateProperties that can be used to filter and update the displayed properties?

Related posts: