
Hi Venkat, You can filter the list and show the filtered list in the UI like this:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.Thanks and Regards,Deepali Kulshresthawww.kdeepali.com<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:attribute name="DataList" type="List" />
<aura:attribute name="FilteredDataList" type="List" />
<lightning:select name="Picklist" label="Status" onchange="{!c.onChange}">
</lightning:select>
</aura:component>
js Controller:
({
onChange: function (cmp, event, helper) {
var selPickListValue = event.getSource().get("v.value");
var filteredList=[];
var dataList = component.get("v.DataList");
for(var i=0;i<dataList.length;i++){
if(dataList[i] == selPickListValue)
filteredList.push(dataList[i]);
}
if(filteredList.length>0)
component.set("v.FilteredDataList",filteredList);
}
})
2 answers