Create set in LWC JS component



Set insertion and deletion can be done but that is not reactive.

Set declaration:
    @track selectedAccountSet = new Set();  


add the  value in set
            this.selectedAccountSet.add(*****VALUE*****);


remove the value in set
            this.selectedAccountSet.delete(****VALUE****);






Comments

Popular posts from this blog

Transaction Security Policy In Salesforce

Salesforce Data Cloud

Add/Remove Content in the VF Page using JS