Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [lightning-events]

Lightning Events are a way for markup component to communicate its changing state

0
votes
0answers
8 views

Firing an application event of package A from package B

I recently came up against a problem related to event communication between two managed packages. In my scenario, I am able to fire an application event from package A and handle it in package B. My ...
0
votes
1answer
15 views

Event fired when user redirects to home : exists?

Heyo all, I am working on a Lightning Community. I need to detect whenever the user goes to the main page (clicking page logo, home ling, whatever...). I tried the following events : <aura:...
0
votes
0answers
44 views

Stop lightning custom event after handling it

I have a custom lightning component that calls another one via event and retrieve specific data. Problem is that I can call my component many times and every time I enter this component again from ...
1
vote
1answer
83 views

Lightning Web Components: How to handle events from grand child on the owner(eventParent) component

I have 3 Lightning web components, Parent ->Child -> Grand child all with just a lightning button inside it. eventParent: <template> <lightning-button variant="brand" label="Submitparent" ...
0
votes
0answers
12 views

Passing Data between two unrelated Lightning Components [duplicate]

Does anyone know how to pass values from one lightning component to another unrelated lightning component? There's no Parent-Child combination and these components or not in a containment hierarchy. ( ...
0
votes
0answers
12 views

The application event not working [duplicate]

I know what I am asking is a very basic example question. But I am trying to understand the application event using an example and it is not working. I tried to figure it out all by myself for a long ...
0
votes
0answers
8 views

Lightning Calander

I am new to lightning, I want to make appointment system using standard lighting calendar, Is there anyway i can replace day in day view with staff name like we have in fullcalendarui. i'll share a ...
0
votes
1answer
21 views

Reuse Deleted Aura Component Name

While doing a trailhead superbadge I created a component event named "FormSubmit". After the fact, I noticed that the specific phrasing on trailhead was "formsubmit" so I deleted the component event ...
2
votes
1answer
110 views

Is it possible to fire an event from a LWC and handle in another LWC which is not in containment hierarchy?

Is it possible to fire an event from a lightning web component and handle in another lightning web component which is not in containment hierarchy? This is achievable in Aura component using ...
0
votes
1answer
33 views

lightning datatable populate on paste from clipboard

Is it currently possible access the clipboard conents from the onpaste event for the lightning datatable? If so how? If not then is there a work around? I want to copy an paste from Excel and ...
0
votes
0answers
90 views

Lightning Record Edit Form onsuccess not firing

Having issues getting the onSuccess Event to fire on my Lightning:recordEditForm. My submit button is outside of the Lightning:recordEditForm and that works perfectly but i'd like to have the ...
0
votes
1answer
139 views

How to handle Lightning Web Component Event from Lightning Aura Component?

I am firing an event from my Lightning Web Component(LWC). Now I have to receive this event by a Aura Component. As per the documentation I am able to receive the event if this LWC is enclosed in the ...
0
votes
0answers
42 views

Lightning aura event handler error

I am using a custom application event (ackRequest) that I use to validate all components in a page. This event is fired in the afterRender of the community layout component. The event is handled ...
0
votes
0answers
23 views

LEX console method issue - lightning:tabClosed

I am trying to utilise the lightning:tabClosed event within my LEX component on a Case. I want to be able to get the record ID for the tab that was closed, as I need to do some processing using that ...
0
votes
1answer
40 views

Dynamic DOM : firing event on click

I am dynamically creating some DOM elements inside my component's controller and adding them to the page. I need to set the onclick event on these elements to call another controller function that ...
1
vote
1answer
41 views

Can't handle an Application event in Lightning

I am trying to handle Application event in a listening component but it doesn't work for some reason. Please, help. I can't write in console log "here" in the end Application <aura:application ...
0
votes
1answer
25 views

Loop through html object collection [duplicate]

How can I access the html element div.card as shown below, the div returns as Proxy{} in lightning and I cannot manipulate the DOM. The div comes from the content in controller because it is in rich ...
1
vote
1answer
287 views

Lightning Web Component use Publish-Subscribe event in Community cloud

How can we use publish-subscriber event pattern in Community Cloud using lightining web component. I have drag-and-drop two Lightining Web Component(LWC) in a community page. On click on first ...
0
votes
0answers
36 views

Firing an event from one component to another in Lightning

Appreciate some guidance. I have a component which has a checkbox component and a calendar component. I would like to fire an event when a checkbox is selected and render the 2nd component(calendar) ...
0
votes
1answer
27 views

Component Event doesn't seem to working! [duplicate]

I was testing passing data between two components using Component Events but something doesn't seem to be right. I am not able to get the value in the Handler component. Could someone let me know what ...
0
votes
1answer
459 views

Lightning Components: Call init method of a child component from a parent component

I want to call the init method of a child LC from a parent LC. I tried to use aura:method, and call the init method from a parent method. ..... <aura:attribute name="userContact" ...
0
votes
0answers
24 views

Lightning Application event undefined in d3.js .on() handler

I'm trying to fire an Lightning Application event from a d3.js handler. Basically I'm doing following: let stageMenuSelection = stageMenuContainer.select(stageMenuSelector), ...
0
votes
1answer
55 views

On change of designer attribute, init() handler is called again

We are using lightning components in a community. We drag drop the components into a template and configure through designer attributes. For one of such lightning component, there is an init() handler ...
0
votes
0answers
32 views

Change Platform Event Notification on Click

We are using the platform events to deliver the custom lead notifications through apex class. Database.SaveResult result = Eventbus.publish(leads); When the user clicks on the notification message, ...
1
vote
2answers
148 views

Undefined value from event

I am trying to get the value of (firstName, lastName, emailAddress, mobile) from the parent component and use it in my child component but when I set it into params and logged the values, I always got ...
0
votes
1answer
26 views

Application Event not recognized by handler component

My handler component (recordCreate.cmp) isn't recognizing an application event for some reason, and generating this error as a result: No EVENT named markup://c:newEngagement found : [markup://c:...
0
votes
2answers
39 views

Lightning Event in Looping [closed]

I know it's a strange question to ask without context but what would be the implications if I have a lightning component firing an 'COMPONENT' type event every 1 second? I imagine it would be quite ...
0
votes
2answers
50 views

Lightning - Which element was Changed?

I have a table for create expenses. I need to identify each element that I select, in order to perform validations or actions for each one. I have tried: var rowId = event.currentTarget.id; It ...
1
vote
1answer
40 views

Passing mutiple attributes to Application type event and handling the event in multiple components

Here is what I am trying to do. I have components A, B, C all on the Home page and there is another component D which has few Aura:If blocks to display differnt blocks as needed. I am using a few ...
2
votes
1answer
91 views

How can you get the caret position when working from an event?

Looking at the Locker documentation they list selectionStart as being a valid attribute, but I can't find a way to access it. I am trying to write an input masking utility, and everything works fine ...
0
votes
1answer
30 views

Capture the same event in 2 lightning components

I have two different lighting components that launch an overlay with the same component inside it. The overlay provides the user a modal to select some options and upload a file using lightning:...
1
vote
0answers
82 views

Send data from Lightning component to visualforce page without window.postmessage

I am using window.postmessage() to send data from lightning component to visualforce page as given in below link. https://developer.salesforce.com/blogs/developer-relations/2017/01/lightning-...
0
votes
0answers
25 views

Lightning: Standard events are not firing in some Sandboxes

I have created a custom lightning component for users to create new Case from the Account related tab. However standard events such as "navigateToSObject", "navigateToObjectHome" are not firing after ...
1
vote
0answers
71 views

custom files related list component not reflecting new files upload

I have a custom lightning component that displays further details from the contentVersion. the customer requirement is to display both, the standard files related list and my custom cmp. now, when the ...
5
votes
1answer
168 views

Application Event fired by a child component doesn't flow down other child component

I have 1 main component (Parent.cmp) which includes 2 components (Brother1.cmp and Brother2.cmp). Brother1 fires an event which should cause an action in Brother2. Documentation says that we should ...
2
votes
1answer
49 views

how to use system events with namespace

Does anyone have an idea how to use lightning system events like showToast or navigateToSObject with namespace of managed package (let us say the namespace is xyz). var toastEvent = $A.get("e.force:...
1
vote
1answer
32 views

Where are events registered with aura:registerEvent documented in the component spec?

This is a seemingly simple question that maybe someone can help me with: the <aura:registerEvent /> tag has a "description" attribute. Based on the way other tags are documented (e.g. <aura:...
0
votes
1answer
265 views

Sending Meeting invite in lightning

i have worked in Salesforce Classic for sending meeting invite thru EVENT calendar. But in lightning, I can only save meeting invite. how can i send same meeting invite to contacts on email in ...
0
votes
1answer
259 views

Event is undefined in afterrender

I have a lightning component that I am adding a click event listener as part of the afterRender. The problem I have is that I want it to fire an event but the event is coming back as undefined. here ...
0
votes
1answer
220 views

'Trailhead Lightning Component Basics: Connect Component with Events' - controller isn't calling 'saveItem'

It works when I test it but I'm getting the following Trailhead error: The campingList JavaScript controller isn't calling 'saveItem' in the Apex class to save the record or setting the 'item' as a ...
1
vote
1answer
885 views

How to get parameter value from event?

I have the following codes: Event <aura:event access="global" type="COMPONENT" description="Event template" > <aura:attribute name="data" type="String"/> <aura:attribute name="sample"...
1
vote
3answers
124 views

Community: Securely pass attribute to different component on separate page

In my community I have an iteration that displays "Open" records from a custom object that shows an overview of their record. Below the overview is a button that currently goes to the standard ...
0
votes
2answers
111 views

isUrlAddressable causes component to no longer initialize after destroy

I have a set of components that run inside a custom tab. This does not have an 'Application' root, just rather a component that holds several other components. Everything works great here. The ...
0
votes
2answers
188 views

Uncheck child component checkboxes from parent button

How can I reach this behavior? My component is structured like this: <aura:component> <button onclick="{!c.clearCheckbox}" /> <aura:iteration items="{v.items} var="i"> ...
1
vote
1answer
191 views

Refresh record detail page and close the a lightning out visualforce from lightning component button [closed]

I have a lex component that runs from a lightning-out visualforce page that opens from a custom button on a record details page. How can I close the visualforce page and refresh the record details ...
0
votes
1answer
35 views

loop through components looking for data in it

im building a list that people select only a single item which works in a limited capacity but reloading or re-selecting isnt very user friendly. the basic concept is a controller retrieves selections,...
0
votes
1answer
80 views

Event not being handled in lightning component

Hello I am trying to handle an event in my lightning component between 2 items being dragged and dropped onto another. My event seems to be firing, however it is not being handled as the function ...
1
vote
0answers
29 views

Lightning Data Service Interaction with Page Edit giving error

I have created a Lightning component to display nearBy accounts using Geolocation for a given Account. I am able to display a list of locations passing BillingLatitide and BillingLongitude from the ...
0
votes
1answer
404 views

getParam Not Working on Simple Application Event

I have a button which when pressed causes an application event to fire. Before it does this it sets a string value using setParam. The event is fired and handled successfully. However, when I try to ...
0
votes
2answers
15 views

Event on adding a related object

So this below is the standard modal for adding a team member: I'm almost sure that when you click "Save" an event is fired and you can catch that event and handle it. The point is I can't find the ...