All Questions
Tagged with onclick lightning-web-components
19 questions
0
votes
1
answer
76
views
LWC - New Correspondence Modal is not working
I have following code for my LWC component. It does not open modal window when I click "New Correspondence" button. I reviewed code so many time and couldn't find what is the issue here.
Any ...
3
votes
3
answers
2k
views
Understanding different events fired by LWC Components
When to use event.target.value, event.detail.name or event.currentTarget.name and what else.
More Info
While building my LWC I ended up using all the three above event variables because in certain ...
1
vote
0
answers
116
views
Custom visual picker onclick fires two click events (LWC)
This morning I'm told a visual picker doesn't work anymore. Simplified version:
<template>
<div class="slds-visual-picker slds-visual-picker_medium" onclick={handleClick} style=&...
1
vote
1
answer
482
views
LWC Repeating Lighting Layout Items with for:each record set and on-click action not getting ID of item clicked
Primary goal:
LWC on Campaign Lightning Page (done)
Get list of Campaign Members from apex wire (done)
Generate list of Campaign Members on left half of screen using lightning layout items (completed)...
1
vote
1
answer
512
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&...
1
vote
2
answers
2k
views
Change text & prevent double click of LWC button
I need to prevent double clicking of a button. My goal is to disable it while im the DML operation is not completed. I am new with LWC so i don't exactly know how to proceed. Right now i just have the ...
1
vote
0
answers
2k
views
I have a button in LWC Datatable which will view cases, i want to switch between hide/view case using same button inside LWC datatable. How to achieve
Below is my component, when i click view case it shows all cases associated with the account, and should change the label to hide case. And when clicked on hide case it should hide the cases shown ...
0
votes
1
answer
3k
views
Get RecordID when i click on button in Lightning Data-table(Child component) and dispatch it to parent component to display related case
I'm a beginner, learning Child to Parent Component communication. Need to get the recordID of account onclick so that i can use it to display cases related to that particular record.
On the Click of ...
0
votes
1
answer
912
views
Lightning icon inside a tag not working properly
I have used html table to show list of records with custom pagination and sorting in lwc component. For sorting, I need to have up and down button along with text on headers.(Clicking on header text ...
0
votes
0
answers
5k
views
Onclick row in Datatable LWC
Hi guys :) I am new in programming and salesforce.
I want to get to the apex and take a name of click company can you tell me what schould I wite in field message = 'NAME OF CLICK COMPANY';. When i am ...
0
votes
1
answer
489
views
Button showing/hiding parametr LWC [closed]
Hi :) I am new in programming and salesforce.
and now i have a problem with buttons. I want to one click it and show a param from js (data).
(company.date schould show just when I will click button)
...
0
votes
2
answers
928
views
LWC Component failed to display
Hi I am new to both coding and LWC, just trying to create a simple component that displays a table of order items in two columns. I want to display only first three items then display a "Show ...
0
votes
0
answers
125
views
How to make a column in lighting datable call JavaScript function?
How to make a column in lighting datable call JavaScript function? This column has to be editable at the same time. Something like in the picture below - but when clicked the account name has to call ...
1
vote
1
answer
3k
views
How can I get the nearest data-id of the clicked element? [duplicate]
On an html page, I want to dynamically draw elements and I want to determine the data-id the nearest element li that contains the clicked element a, and then add a class to the element with the li ...
3
votes
0
answers
2k
views
Close Toast Message with messageData on hyperlink click - lwc
I have a toast message in lwc that uses sticky mode (does not go away until the user click on close symbol) and also messageData (to add a hyperlink in the toast for the user to click on).
The thing ...
0
votes
1
answer
2k
views
Auto focus to first cell of empty row in lightning datatable when new is clicked
I have a Add button and a lightning datatable.
When I click on add button I want to add a row to datatable.
Now, Instead of showing a popup (after clicking add btn) I want to show an empty row and ...
1
vote
0
answers
668
views
window onclick listener not working properly
I have created a custom lightning web component that, if an specific div is found on the template and you're clicking outside of it, it must close the current div
constructor(){
super();
...
1
vote
1
answer
3k
views
press and hold mouse event in LWC
I have a below button in LWC
HTML:
<lightning-button-icon icon-name="utility:chevronright"
onmousedown={slideRight} variant="bare">
JS:
slideRight() {
this.template....
0
votes
0
answers
1k
views
Why .addEventListener("click" doesnt work on mobile but works on computer?
I have an LWC that works perfect in computers but doesnt work on mobile Devices
marker.addEventListener("click", function(e){ // Centra la pantalla al marker seleccionado
...