Questions tagged [lightning-events]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
16 views

value not retaining when showing a different template

I am very new to LWC. And i am confused about why value is not coming in input text when i am going back to the same div(template). <template> <br/> <br/> <template if:true={...
1
vote
1answer
20 views

Trigger a spinner from child component up to parent component (LWC)

I have a checkbox in a custom datatable in a lightning-card. When the checkbox is checked or unchecked, I want a lightning spinner to cover the entire component to stop the user from doing anything ...
2
votes
0answers
21 views

Can not Remove class in Lightning Component

**Lightning Component1 JS** clearAllClickedButtons : function (component, event, helper) { component.set("v.uncheckButton",''); var clearAllFilters = component.find('uncheckButtons');...
1
vote
1answer
35 views

EventLogFile : How can we see how many times a user clicks on a hyperlink

On our Account object we have a custom formula field that spits out a hyper link to the user. When the user clicks the link they are directed to a custom lighting component. Using the EventLogFile ...
0
votes
1answer
45 views

Capturing a Flexipage Lightning Tab Change

TL;DR Is there a way to capture / fire a lightning event to know a tab has changed when using the standard flexipage / lightning tabs component? We're trying to design a reactive page that has ...
1
vote
1answer
31 views

Lightning Web Component PubSub Only Works for Admin in Community Preview

Below is my publisher. It's nested in an Aura component, which is itself on a community page: import {LightningElement, wire, track, api} from 'lwc'; import { CurrentPageReference } from 'lightning/...
2
votes
1answer
25 views

How we can identify from which component the event has been fired?

I have a scenario that I have an event called AdviceEvent registered by two different components ParentCmp and FriendCmp. And Third component called PersonCmp is handling both event. The Question is ...
0
votes
0answers
25 views

How to use application events for two different components

I want to make two separate components to display Opportunity field values and filters on separate component without parent-child comp relationship I don't want to use parent child component ...
1
vote
1answer
52 views

Fire an event when the page has loaded with all the assignation

I have below JS code in LWC @track arrayLength = 0; // changed its vale from 0 to 5 in one of the wire methods @track 2ndArrayLength = 0 // changed its value in another wire ...
1
vote
2answers
115 views

How to send multiple parameters to Event in LWC

I have a below event in LWC const selectedEvent = new CustomEvent('custEvent', { detail: this.someData; }); this.dispatchEvent(selectedEvent ); I also want to pass this.anotherData; Could ...
0
votes
1answer
22 views

use of lightning navigate:navigate from one component to another in lightning community

var eUrl= $A.get("e.force:navigateToURL"); eUrl.setParams({ "url": url }); eUrl.fire(); I am trying to replace above in my code as per documentation it is not ...
0
votes
0answers
27 views

lightning component - event listener from canvas app without canvas SDK

We are using salesforce canvas app in lightning component to expose a nodejs app in salesforce.NodeJS app is publishing event using postMessage. How can we subscribe to the event that is publish by ...
0
votes
1answer
60 views

LWC - Why is the computed rowId for my custom data type in lighting-datatable undefined?

I have a custom lighting-datatable where the last row is a column that contains two buttons. When either of these buttons is pressed, I am attempting to retrieve the rowId of the row where the button ...
6
votes
2answers
449 views

LWC : Events - When to use event.target.value & event.detail.value [closed]

I am looking for the difference between event.target.value and event.detail.value. It was mention that To communicate data to elements in the same shadow tree, use event.target and To communicate ...
1
vote
1answer
33 views

Component event not being caught

It looks like the event is firing but the handler is not catching it. How do I go about getting this component event to be handled? EVENT: <aura:event type="COMPONENT" ></aura:event> ...
0
votes
2answers
35 views

Aura event not being caught

I have an onMouseover function that fires and event to another component within an app. The event is firing correctly but the other component is not 'listening' to the event. None of the code in the ...
0
votes
1answer
29 views

How to track if user has inputted any text on the Salesforce Chatter Email Publisher

How do we know when user has made any inputs on the Email Publisher? When user made any changes to this field, and accidentally closes the tab on the Service Console, there will be no pop up message ...
0
votes
1answer
235 views

communication between 2 LIghtning web componets, passing dynamic parameter from Parent to chlid LWC using Events

I would like to send record Id(Seminar ID dynamically from for each) from Parent LWC to Child LWC Template Code: <lightning-tile key={seminar.Id}> <lightning-layout key={seminar.Id}> ...
1
vote
0answers
108 views

Issue/bug with standard spinner

since last week i've this problem on the org and i'm still not able to solve it. Here's the details: In every standard action like creating or editing an account using the standard buttons Edit and ...
0
votes
1answer
106 views

Lightning Event not firing in Component

I am working through the Aura components trailhead but am running into an issue where the component event is not firing. Here is my code: CampingList cmp <aura:component controller = '...
0
votes
0answers
11 views

Is it possible to add Notes and Files to an new Task or Event in Lightning?

Is there any way to add Notes and Files when user tries to create a new Task or Event in Lightning. But in Salesforce Classic we could see the attachment in the UI, when user tries to add any ...
1
vote
1answer
128 views

LWC Event handler for event type with underscores

According to the documentation on event dispatching event types should follow these rules: No uppercase letters No spaces Use underscores to separate words When I attempt to use underscores in my ...
2
votes
1answer
27 views

Can an application event be handled by a lightning component whose body isn't rendered?

I have a component that receives an app event to indicate if it should be made visible or not. I'm firing this app event from another component on the page. The receiving component show only show ...
0
votes
0answers
55 views

GetTabInfo or TabUrl of Closed Tab in Lightning

<aura:handler event="lightning:tabClosed" action="{! c.onTabClosed }"/> ({ onTabClosed : function(component, event, helper){ var workspaceAPI = component.find("workspace"); ...
0
votes
1answer
37 views

How to pass event.preventDefault(); from child to parent

I have a wizard with a child object. The child object has an event.preventDefault(); (Step 2 wizard). How do I pass this to the wizard (parent) to prevent going to the next page (step 3) of the wizard....
0
votes
3answers
262 views

Override Default Tab Key press event in Lightning component?

I am trying to override the default tab key press event. For other key this custom method is getting called but for some keys like Tab,enter.. it's not working. Below is the code what i tried. xxx....
0
votes
1answer
29 views

RefreshView Event is not getting fired in custom object record page

I have a lightning component which is residing in a lightning record home page of a custom object. If I modify any fields, usually Salesforce fires refreshView event and we can consume the event in ...
3
votes
1answer
859 views

LWC – Access Templates and Methods of child components (multi-chained children)

Normally closed shadow DOM/root will not allow the access of child component's DOM. Consider below example: <main-component> <parent> <child> <iteration&...
1
vote
0answers
152 views

Unable to fire force:runActionComponent application event

Currently, LWC doesn't support QuickActionApi, but I really need it. Also, I am investigating option to wrap my LWC component by Aura component container, which will use quickActionApi and interact ...
0
votes
0answers
104 views

aura:iteration Data table: Cannot find Aura:id for the lightning input used inside the aura:iteration

i need to use the aura:id of lightning:select. the table is rendered inside aura:iteration. there is another field(table column field) inside table that needs to be shown based on the the select ...
1
vote
1answer
45 views

Lightning component detect keystroke in page [closed]

Is there a way to a lightning component detect when the user click a key in the page as whole? My idea is to have the component in the home page and using a shortcut the user can invoke an action even ...
0
votes
1answer
55 views

How we fire 2 or more events continuously in lightning component?

I'm facing a below problem when redirect to view the detail page then wanna display Edit popup. Please help me resolve this. In my component js. var retParams = '0010k000008IsVXXX' // Id of ...
0
votes
0answers
32 views

Get/set an attribute trough Lightning Event

I can't get the attribute trough Lightning Event. By clicking on the button "Get msg" I get undefined: ceEvent.evt: <aura:event type="COMPONENT"> <aura:attribute name="message" ...
1
vote
0answers
69 views

Handling Application event in Utility Bar component

I am using a utility bar in a lightning application. I am having a component on the contact record page, from where I am firing an Application event and having a handler on a component which is in ...
0
votes
1answer
37 views

How to set a record's field from the List in component to event?

I have a cmp with List of objects and iteration: <aura:iteration items="{!v.Objects}" var="object"> <div label="Set Id" name="{!object.Id}" onclick="{!c.action}"> {!object....
0
votes
0answers
51 views

Initialize the standard Inline-Edit functionality from a Custom component action

I have standard Opportunity record detail page which has the standard in-line edit functionality. On my opportunity flexi-page, right side custom panel has custom component which needs to update the ...
2
votes
1answer
460 views

How to setup eventListener for a LWC component to receive messages from an embedded iFrame

I am having trouble setting up an eventListener for my LWC component to listen messages received from an embedded iFrame. I have a parent component where I have set the event listener in ...
1
vote
2answers
206 views

Lightning empApi subscribe and unsubscribe method in JS constroller

I have an component using lightning empAPi. In controller, I am using subscribe method and didn't using unsubscribe method. Is that required to use unsubscribe method in controller. IF required please ...
0
votes
1answer
36 views

Aura Component don't catch event from another one

Lightning Event: tripEventer, attribute - trip, Trip__c Component Item: <aura:registerEvent name="openTripEvent" type="c:tripEventer"/> <lightning:button class="slds-align_absolute-...
0
votes
1answer
223 views

Set lightning input in a child component based on parent component onChange event

I am implementing simple Contact create/edit form and I have problems with automatic setting of one field (consbp) based on an entry in different field (AccountID). The main component (contactCreate....
0
votes
1answer
35 views

How to detect list element data changes with “change” handlers?

Accordingly to the documentation, the special aura change handler can be used to detect when a value in one of the component's attributes changes. Everything is fine with attributes of type Boolean, ...
2
votes
1answer
239 views

event.detail is undefined in Lightning:recordEditForm submit event

I'm trying to get field values at Lightning:recordEditForm onSubmit() event.In the documentation example it shows below. my onSubmit event handler as below, I end up getting error, [event.detail ...
2
votes
1answer
61 views

wave:selectionChanged behaviour in Summer '19

I'm creating a lightning app that interacts with an Einstein dashboard. The idea is that when a user filters data in the dashboard, a search is performed in an external system using the filtered data. ...
1
vote
1answer
44 views

Building Custom Related List Component

I created a reusable lightning component that will act as a related list component. I want to handle add/remove event when the user makes changes from Edit Page (Settings-> Edit Page). Example: I ...
0
votes
1answer
612 views

How to force width resizing of lightning:datatable?

I've structured a component in a way that either a lightning:datatable aura component or a lightning:dualistbox. The dual list box is used to set the columns attribute of the data table. The issue is ...
1
vote
1answer
1k views

Calling Application events in LWC [closed]

i would like to call an Application event in Lightning web component. Below link describes the same in AURA. https://developer.salesforce.com/docs/atlas.en-us.218.0.lightning.meta/lightning/...
0
votes
0answers
56 views

window.addEventListener firing Multiple times

I have a situation where I need to reDirect the lightning page to record detail page once BACK button in iFrame is clicked. So, Java team was sending a postMessage from the page which I am opening it ...
1
vote
1answer
122 views

Unable to see Attendee list on event object in lightning experience in Spring'19

As per the below link of salesforce release notes, we can now see the attendee list on the event object in the lightning experience without enabling setting up the lightning sync. Salesforce Release ...
0
votes
0answers
10 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
24 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:...