Posts

Showing posts with the label eventHandling

Salesforce LWC: Basic Drag and Drop Functionality

Image
Recently I attended Salesforce VirtualDearmin session and I found this session very interesting and I thought to share this with everyone of you. For more detail you can refer below link on Drag and Drop Functionality: https://forcementor.github.io/lwc_dnd_20/#/ In this blog we will see about Drag and Drop functionality in Salesforce using Lightning Web Component. To implement drag and drop functionality there are few standard HTML events which we will use to implement. Lets see first what we are going to achieve in this blog with a small video- Now we have clear understanding what we are going to achieve. Let us go to the code. First we will create very basic UI with 3 layout-item. One for each New Task, In Progress Task and Completed Task. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 <template> <lightning -layout vertical-align= "stretch" multiple-rows= "true" class= "x-large" > <lightning -layout-item...

Salesforce LWC: Lightning Message Service (Kind of Application Event in LWC)

Image
Today in this blog we will learn about Lightning Message Service. We know about custom event in Lightning Web Component which we use when two LWC components are in same hierarchy. But what if both Component are totally independent. So for that Salesforce has introduced Lightning Message Service in Winter'20. But it was a beta release. Now in Salesforce Summer'20 release it is available and the main advantage of LMS (Lightning Message Service) is that we can use it in VF Pages or Aura Components or in LWC. So when we want to use LMS then we are going to send message from one component to another. It means there will be one Publisher (who is publishing the message) and other will be Subscriber (who is receiving the message). Now if Publisher and Subscriber want to communicate then both want some channel from which they can pass their communication. So for that we need Lightning Message Channel.  Lightning Message Channel: Lightning Message Channel is a new Metadata ...

Followers