Skip to main content

Questions tagged [lightning-events]

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

Filter by
Sorted by
Tagged with
3 votes
3 answers
3k views

Can we reload screen after Save from force:editRecord event?

I've a Custom Lightning Component displaying a List custom object records. On each data row, I've custom button to Edit the record. On Edit click, I've fired following event: var editRecordEvent = $...
0 votes
1 answer
1k 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 ...
2 votes
1 answer
2k views

How to handle an event in a child component that is fired from a dynamically created grandchild component?

I have a component that includes a child component. The child component has a button that fires showCustomModal on an overlayLibrary and the content is a dynamically created component. Component ...
1 vote
0 answers
42 views

Child component need to re render after value changes in parent component

I have 3 components. Grand Parent --> Parent --> Child. When ever data changed in Child LWC I need to Re-render the Child LWC which is inside Parent LWC. I have tried GET SET methods also. But ...
0 votes
2 answers
833 views

Component - event fired and handled in same component

What is the use of component event which we fire and handle in the same component? I mean what is the specific use case for it...like apart from our regular controller actions...
2 votes
1 answer
1k 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 ...
0 votes
1 answer
3k views

Unable to close quick action from LWC (from Web component)

I'm directly using LWC component in the Quick Action through flow, once the submit button is called I'm dispatching an event from LWC but aura is not capturing and also Quick action modal is not ...
0 votes
1 answer
1k views

LWC HTML not rerendering after object change NOT Solved

I am having a similar issue as the one linked at the bottom, it looks like the answers are claimed to work, however I cannot seem to figure out wth is wrong with my code that seems to be very similar. ...
2 votes
1 answer
359 views

Aura Component could not catch a component event triggered from a child Aura component

Lightning Event: tripEventer, attribute - trip, Trip__c Component Item: <aura:registerEvent name="openTripEvent" type="c:tripEventer"/> <lightning:button class="slds-align_absolute-...
5 votes
5 answers
12k views

Cannot read property 'config' of undefined

I get this error just randomly: Uncaught Error in $A.getCallback() [Cannot read property 'config' of undefined] Callback failed: apex://taskKanbanController/ACTION$getKanbanWrap Here's the relevant ...
1 vote
1 answer
2k views

Handle LWC event in Visual force page

I have overridden Standard "convert Lead" button with a Visual force page. LWC component is inside Visual force page using Lightning out. When I click Cancel button in LWC component, I want ...
1 vote
1 answer
2k views

LWC event listeners not responding

I have an LWC child component that is dispatching a custom event as such: console.log('bw: fire saveslotclick custom event'); //fireCustomEvent(this, 'saveslotclick', { slot: this....
0 votes
2 answers
991 views

What event fire when you attach a file/attachment on the record page?

I've created a lightning component that shows a table of all contentversions related to the record detail page you are on. However, if upload/add a new file using the "Files" related list, it doesn't ...
5 votes
3 answers
7k 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
1 answer
54 views

Is it possible to create a calendar in a Chatter group?

I was curious if anyone has ever been able to create a calendar in a Chatter group? I have looked online, but didn't find any information on this topic. I am trying to create a calendar in a Chatter ...
1 vote
2 answers
927 views

How to get lightning component iteration variable with lockerservice

I have a lightning component that looks like this: <aura:iteration items="{!v.categories}" var="category"> <li data-category-id="{!v.category.Id}"> <ui:inputCheckbox change="...
0 votes
1 answer
484 views

LWC Custom Event Issue

I have a LWC Component A(Child), Whose javascript is dispatching an event like this: dispatchRefreshImageDetails(imageId) { //imageId contains Full Image URL as from content version object. ...
2 votes
1 answer
303 views

Return Entire Object from for:each Template in Lightning Web Component (LWC)

Is it possible to return an entire object (not just a single field) from a for:each Template in LWC? Specifically, I'm not sure why I can't access the object in the same way I can a normal object in ...
0 votes
2 answers
10k views

Fire an event on enter button press in LWC

I am trying to implement a button that will fire a search event when it is clicked and also when enter button is pressed. How to listen to the enter button press? This is the code for my button. &...
-1 votes
1 answer
1k views

You have a parent LWC Component A which has two child LWC components B and C. How would you communicate between B and C?

I was asked this question and answered as follows : I would fire a custom event from child B, I would catch the event in the handler of Parent A and retrieve the value in the handler from event.detail ...
5 votes
2 answers
5k views

how to access the save button in a modal when implementing the force:lightningQuickAction

I am actually creating a component that will implement the force:lightningQuickAction so that my component open in a modal window from the action button.I would like to capture the event where the ...
1 vote
1 answer
398 views

LWC - render component onclick event

I have a lightning button and I have an instance of js Date class. When I click on a button I want it to to show me a date that was week before (subtract 7 days). Here is my .html file: <template&...
0 votes
1 answer
2k views

How to catch horizontal scroll event of a LWC lightning data table to implement fixed column in datatable

EDIT : Background of original requirement. We want to implement a "freezed" 1st column in a custom lightning datatable. When we scroll to the right, 1st column should always be in view. ...
1 vote
0 answers
363 views

Manually Trigger cellchange Event on Datatable

Is there a way to manually trigger the cellchange event on a datatable? I'm using a custom datatable that allows a custom data type - a dropdown (combobox) - it's based on this custom datatable. I ...
0 votes
1 answer
301 views

Sending specific objects data from salesforce to third party on every create, update, delete

We are thinking to do reporting in snowflakes while the data creation will happen inside salesforce. To do that, we need to send data to snowflakes on record creation, update and delete. I have gone ...
1 vote
1 answer
795 views

LWC - before unload does not trigger when changing URL within Salesforce

I have a LWC where the user can edit some records, but those changes are not persisted to the database right away. Instead, I would like to warn the user when they are about close the browser tab or ...
0 votes
0 answers
333 views

How to call renderedCallback() in HandleChange field input only once

I have LWC with search input, with every handleKeyChange click on input, renderedCallback() is called, but I need it to call only once. Controller: @track hasRendered = false; @wire(getAcc, { ...
1 vote
1 answer
903 views

CloseActionScreenEvent bubbles

Here I've read that CloseActionScreenEvent does not bubble, but we can set in the constructor a EventInit object to force bubbles = true. So I have the following this.dispatchEvent(new ...
0 votes
1 answer
693 views

Handle Opportunity Stage change

Reuirement : To show the fields and their values BEFORE saving the opportunity ONLY when opportunity Stage is changed to 'closed WON'. For this I'm trying to use the LWC along with lightning modal but ...
14 votes
3 answers
33k views

NoErrorObjectAvailable Script error

I have a LWC that is used in different orgs. In one of them, when I dispatch an event like: this.dispatchEvent( new CustomEvent( 'press' )); I am getting the [NoErrorObjectAvailable] Script error in ...
1 vote
1 answer
112 views

Visualforce handler not invoked when event fired in aura component

I'm using an aura component in a visual force page. Aura Component: RichInputText.cmp <aura:component> <aura:attribute name="bodyVal" type="String" /> <!-- ...
0 votes
1 answer
76 views

Detecting the state of the alt/option key in a LWC Headless Quick Action

I'd like my LWC Headless Quick Action to behave differently when the alt/option key is held down. But the platform abstracts away the browser events and calls the invoke function with no additional ...
1 vote
0 answers
123 views

Something is wrong with my code. [LWC Lifecycle hook problem]

I am stuck and unable to figure out a way to get out of this problem. I know I am doing something terribly wrong here. I have two LWC Components - Parent [a container with multiple values to select[...
0 votes
0 answers
74 views

Code inside apex method not running intermittently on button click Aura component

I'm having a parent and child Aura component. There is a button on the parent component that invokes a js action and it further calls a aura enabled apex method. The issue is it is calling the apex ...
-1 votes
1 answer
235 views

Refresh LWC component on another lightning page

I have a LWC component on Account page, which displays a few fields from related opportunity. The requirement states that I need to update LWC on the account record page whenever a defined set of ...
-1 votes
1 answer
252 views

What are the events triggered by the standard Opportunity Sales Path?

I want to build some functionality that will notify the user once they click on any stage in the standard sales path on the opportunity layout but before record save. What are the events which I can ...
0 votes
2 answers
6k 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 ...
0 votes
2 answers
691 views

in LWC Create a text box on child and button on parent whenever click on that button get child value and reflect on parent?

childCompoLWC <template> <lightning-card> Enter value:- <lightning-input type="text" value={strInput} onchange={handleChange}> </lightning-input> </...
0 votes
0 answers
126 views

Why shows this error in Aura lightning Events?

ChildCompo:- <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,...
0 votes
2 answers
724 views

LWC Event to Catch internal Salesforce Navigation [duplicate]

My Question : Are there any events which checks whether user navigates to which navigation menu right now ? For Example : When I am at Case Record Page and my LWC is placed there, So If I switch to ...
1 vote
1 answer
409 views

LWC Local Server says Couldn't find the custom component when I pass attribute using Custom Event from child to Grandparent

Im trying to do a simple operation which is pass an attribute from child to grandparent in LWC using Custom Event where I set the Bubbles and composed attribute to true to pass it through the ...
0 votes
1 answer
346 views

Problem to show String list in Show toast event

Hello everybody I am working with a LWC form that gathers the information from the user and send it to an apex function that validates the data. If this data is incorrect it send the list of errors of ...
3 votes
4 answers
8k views

The campingList JavaScript controller isn't calling 'saveItem'

The Trailhead challenge check is telling me the following: Challenge Not yet complete... here's what's wrong: The campingList JavaScript controller isn't calling 'saveItem' in the Apex class to ...
0 votes
0 answers
366 views

Lightning out App error in callback function in aura component created from vfp

I have a vfp as below called from a related list button which create an aura component: $Lightning.use("c:LA03_SendFormToContact", function() { $Lightning.createComponent(...
2 votes
1 answer
1k views

Make wrapper attribute reactive in LWC

I will elaborate more than necessary on the issue i am facing, so that if i there is an entirely better approach to implement what i am doing, someone can suggest that. I am building a lightning ...
0 votes
1 answer
704 views

OpenCTI: Throw a Lightning event from Visualforce up to Lightning Experience?

We're working with an OpenCTI adapter that the vendor has open-sourced for us. So we have the ability to customize the dialer page which is by design written in Visualforce. The dialer appears in the ...
1 vote
1 answer
1k views

Selected input value not reflecting in JS controller of LWC

I am trying to create LWC component with HTML markup as below. The selected input values are not reaching JS controller. Tried multiple ways but the value is showing as null. Below is the code. What I ...
0 votes
1 answer
317 views

Lightning component: component visible event

I have an aura component for case in service console. For every case tab opened, an instance of the component is created. I need a way to know when a component becomes "visible" or "...
2 votes
0 answers
195 views

How to send data from Aura Components to Google Tag Manager?

I'm trying to implement GTM in Experience builder. But I want to send the send some page details through datalayer to GTM. I couldn't find right documents & articles for that. Can Anyon help me ...
1 vote
1 answer
1k views

LWC event listener in head markup

I'm an analyst working with a developper to receive some values from a LWC. We are trying to pass values through dispatch/listener, but the eventlistener is not triggered. The end goal will be to some ...

1
2 3 4 5
7