You need to sign in to do that
Don't have an account?

Filter List Based on multiple Fields on Component
I am trying to understand how I code my controller to handle multiple fields on a component used to sort my list. I have 6 lightning:select fields on my component that I want to use to filter down my list attribute. I'm using this for one of the fields (which works fine) However, I'm struggling how to further filter the "filter" list so that it removes any that don't meet the other field criteria. Any help is greatly appreciated!!!!!!
thanks!!!
Fred
thanks!!!
Fred
if(selectedGroupNum != '' && selectedGroupNum != "All") { if(c.Group_Number__c == selectedGroupNum){ filter[k] = c; //console.log('!!! 2 filter' + JSON.stringify(filter[k])); k++; } } //Set the filtered list of contacts based on the selected option component.set("v.groupstructures", filter);
Refer this link
https://github.com/SalesforceLabs/EnhancedLightningGrid/blob/master/aura/SDGFieldChooser/SDGFieldChooserHelper.js