Posts

Showing posts from April, 2020

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**** );

Pass value from child lightning component to parent lightning component using Dispatch Event: LWC

Parent Lightning Component parentComponent.html < template >      < lightning-card >          < div   class = "slds-p-around-medium" >                 {selectedAccountId}              < template   for:each = {accountsList}   for:item = "accountRecord"   >                  < c-child-component   account = {accountRecord}   key = {accountRecord.Id}   onobjectlistitemselected = {handleObjectListItemSelected} ></ c-child-component >              </ template >          </ div >      </ lightning-car...