Questions tagged [lightning-web-components]

This tag is for questions related to JavaScript, CSS, or Markup when used in the Lightning Web Component (LWC) programming model, or for questions of interoperability between LWC and the original Aura-based lightning components.

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

How to access related record field values from apex call

I have an object called Customer_Experience__c that is the child of a master-detail relationship to the Contact. I'm able to view the entire record in the console log but I need to assign the field ...
0
votes
1answer
23 views

LWC Html table with lightning-input onchange giving error

I have a html table in my LWC child component which is populated from the parent. I am able to pass the values and display the data on the child component. On the child component the table has a ...
0
votes
1answer
18 views

updating js object in lwc

I have to change an attribute of a JSON object. Ex. allOppList= [[{"A":"2051-11-21","B":"FLOAT"}]] I have to change the B to "xyz" in the JS file. I ...
0
votes
0answers
17 views

Import a library with DOM properties to LWC

I'm trying to use a library with DOM properties in an LWC but many things are not working because DOM properties as document.getElementById or document.defaultView.getComputedStyle are not allowed in ...
1
vote
1answer
17 views

unable to close quickAction component

I have LWC wrapped in quick action Aura component and on button click I am trying to close the quick action but the functionality is not working. After clicking on close button modal is still open. My ...
0
votes
1answer
30 views

How to color border for a row in table on specific condition in lwc

<table class="slds-table slds-table_cell-buffer slds-table_bordered slds-border_left slds-border_right"> <thead> ...
0
votes
1answer
25 views

LWC quick action not working

I am trying the new summer 21 feature: LWC from quick action. I am trying this on my developer edition, already updated to summer 21 version. But with a very simple code, the modal is not opening and ...
0
votes
0answers
26 views

LWC table my custom object and combobox picklist filtred

I have a task to display a table of positions with the status field Combobox Picklist filtred. As I have not experience in JS and LWC, it is so difficult for me to understand how to do this. Help me ...
0
votes
0answers
38 views

Can we add borders to selected row in datatable?

How can we add border to a selected row in datatable in lwc?
0
votes
0answers
23 views

Change height of component opened by lightning quick action

I have a component that is called by a button that uses: to describe the html page but no matter what I do I can't get it to change the height of the HTML page on the component. I would like the ...
0
votes
1answer
20 views

Is there a way to make button groups within a lightning web component responsive?

I would like to know if it is possible to change the way button groups appear based on the size of the browser window. Below is a screenshot of a small component that I have. The buttons themselves ...
0
votes
0answers
27 views

LWC datatable, how do you expand the white space? [closed]

So as you can see there's simply not enough space for my combobox....how does one expand the whitespace for the datatable is it even possible? I've https://www.lightningdesignsystem.com/utilities/...
0
votes
0answers
31 views

Third party JS within LWC

I'm trying to call a third-party payment application from LWC Salesforce, to do that I added the JS library file to the same folder where the LWC is. However when the component rendered it's not ...
0
votes
1answer
54 views

Using @track with @wire causing issues with LWC

I am trying to create a custom list view and deploy a LWC that lists records in the list. My component works with dummy data, but once I created an Apex class to execute my SOQL query it is having ...
0
votes
0answers
17 views

Calling LWC from Aura component, but LWC doesn't render when using standard button to call aura for the 2nd time

I'm fairly new to Aura and LWC altogether. I'm overriding a standard new button with an Aura Component and calling an LWC component from there. LWC component calls another LWC component from it. I'm ...
0
votes
1answer
36 views

I am trying to make a JS function for full screen in LWC

I have have gone through many resources related to view full screen but none of the JS related functions are working in LWC. Here is my code: <div class="xyz"> <div class="...
0
votes
1answer
17 views

Error while starting lwc local server

[MODULE_NOT_FOUND] Error Plugin: @salesforce/lwc-dev-server: Cannot find module '@babel/helper-builder-binary-assignment-operator-visitor' Require stack:
0
votes
1answer
15 views

Displaying button group vertically

I'm using lightning-button-group in my LWC component however, by default it displays the grouped buttons horizontally - in one row. How would I change it to display vertically? Thanks.
0
votes
0answers
15 views

LWC JEST test for API callouts

I want to write JEST test for the following component: // JS file: HTTPCalloutInLWC.js import { LightningElement, track} from 'lwc'; // importing apex class to make callout import getCurrencyData ...
1
vote
1answer
49 views

Quick Action as LWC 2021 [duplicate]

I am attempting to create a Quick Action using LWC without using Aura however I am getting a error. I was reading the documentation https://help.salesforce.com/articleView?id=release-notes....
0
votes
0answers
21 views

Modal always opening on top of the page in mobile view - LWC

i am using standard html table on click of i am opening a modal . When user is at bottom of the table or somewhere middle, when clicked the modal is opening at top of the page and user has to again ...
2
votes
1answer
39 views

“Apex action method must be static and annotated with AuraEnabled” but it is already static and annotated

public with sharing class LoanApplicationsData { public static List<Loan_Application__c> getLoanApplications() { @AuraEnabled(cacheable=true) List<Loan_Application__c> ...
4
votes
1answer
47 views

LWC lightning-datatable not accepting cellAttributes in the first column

Lightning-datatable is not accepting any cellattributes in the first column. All other columns are formatting correctly. Is this a limitation, or am I doing something wrong? (Irrelevant code removed ...
-1
votes
1answer
23 views

Pass the row details of datatable to another component [closed]

I need to pass the row details of a data table to another component and in the second component there will be some operation on that record. so how can I pass the row details of a datatable based upon ...
0
votes
0answers
17 views

Override “Edit” Action without navigating to another page

I have two objects: Agreement (Parent) and Guarantee (Child). I have overriden the "Edit" action on Guarantee object, so when i am on Agreement page and click "Edit" on a Guarantee ...
0
votes
1answer
49 views

How to get values of map passed form apex to lwc js?

Apex code: @AuraEnabled(cacheable=true) public static Map<String,List<String>> getSeatList(id seatId, List<String> fieldSetList) { Map<String,List<String>> ...
0
votes
1answer
35 views

Apex issue in production Too Many SQL queries

I created a LWC using an APEX class Everything worked perfectly on Sandbox but when I moved my code to production I get Too Many SQL queries 101 I don't know what to .. is there something wrong with ...
0
votes
1answer
24 views

I need to design below is any idea its highly appreciate? [closed]

Need to design attached page need idea for this it is possible using LWC and another method we have in salesforce?
0
votes
0answers
28 views

lightning web component navigate to record edit page with default field value not work

I have a action button which will navigate user to record edit page with a default field value setting. const defaultValues = encodeDefaultFieldValues({ Stage__c: 'Pending Requestor' ...
1
vote
1answer
45 views

LWC Quick Action on Case

I am trying to create a button on Case to set the Status to Closed Case, however the button is not appearing on the Case Page Layout and I am not sure why. I dont see that when creating a Lighting Web ...
0
votes
0answers
25 views

Reinitialize child component from parent - LWC

Is there any way of reinitializing/ resetting/ refreshing child component form parent in LWC? In the picture, parent component passes the geo coordinates to child and the child is rendered on parent ...
0
votes
0answers
20 views

How Do I read a csv file upload in LWC? [closed]

I have a custom csv file uploader in LWC.I want to display the tables of the csv file.- How do I read a csv file and display it ?
0
votes
1answer
34 views

is recordId passed to lwc in a quick action?

I made a lwc to use as a quick action, but despite declaring an @api recordId property, when logging it in connectedCallback, I get undefined. This is the configuration: <targets> <target&...
0
votes
2answers
28 views

Salesforce DataTable issue with timeZone of datetime field

Issue I am facing is I am querying a list of data. When I am displaying that data in dataTable, datable is showing date time field based on machine this code is running, not on timeZone assigned to ...
0
votes
1answer
27 views

How to pass current recordId to Lightning Web Components(Quick Action) for target lightning__RecordAction and actionType ScreenAction

have a component like, <?xml version="1.0" encoding="UTF-8" ?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>...
0
votes
0answers
40 views

LWC record-edit-form wont work with rich text area field

I am trying to update a rich text area field inside record-edit-form in lwc but it wont update once clicked inside the rich-text-area field placeholder. Scenario is: This UI is for an Edit Page. On ...
0
votes
0answers
25 views

Javascript in LWC in wire adapter not working as expected when parsing data

I need to edit a picklistvalues json to add another picklist value. I used the parse/stringify to make the json editable. I had it working in a sandbox, but when deployed to a scratchorg it seems that ...
0
votes
1answer
23 views

How to get URL for Lightning Component

I have a Lightning component that deletes records as a URL button on a related list. I'm trying to find out how to get the URL for the Lightning component to call it to delete the related list records....
0
votes
1answer
28 views

lwc - wire adaptor not taking in variables as arguments only hardcoded values

I am trying to pull in picklist values of a field based on record type. The below works - @wire(getPicklistValuesByRecordType, { objectApiName: 'Case', recordTypeId: '0123h000000kv04AAA' }) ...
0
votes
0answers
47 views

LWC Quick Action - recordId propertyindefined in ConnectedCallback context

I am trying to create lwc quick action, which was introduced with the Summer 21 release. I want to use the recordId property from the object that I am on, but the property is 'undefined' in the ...
0
votes
0answers
14 views

Can we use Account News Standard Component in Custom LWC Component? if yes than How?

Account News is a standard component, I want to add this in Custom LWC Component.
0
votes
1answer
31 views

JQuery Datatable in LWC responsive not working

I am using JQuery Datatable in LWC (https://datatables.net/extensions/responsive/examples/) which i can use both in desktop and mobile version . I am trying to achieve the below responsiveness where ...
-1
votes
1answer
32 views

Conditional rendering isnt working for Object in LWC

Instead of declaring many variables in JavaScript side, Used Object Approach, but Object rendering isn't working properly. (No error in Apex side,response is coming properly that why not added that ...
0
votes
1answer
23 views

Worker for Background Process in lwc javascript

Im implementing a stopwatch in salesforce. It runs fine if Im in the same time where the stopwatch is ticking(lets say tab a) but if I switch to another tab(lets say tab b ) for a while the time is ...
0
votes
1answer
15 views

CSFR Errors When Accessing VisualForce Page From Lightning Web Component Even With NavigationMixin

I've seen many questions on accessing Visualforce pages from LWC, including the following Is it possible to navigate to a Visualforce page from an LWC with parameters and community compatible however ...
0
votes
0answers
11 views

Input focus during validation of form with child components

I have a parent component that contains a form. Inside of this form there are some inputs as well as multiple child components which also contain inputs. <template> <form> <input ...
0
votes
0answers
23 views

@api validate of Salesforce flow lets user continue to next screen even when the isValid property is set to false

I want to control to users navigation to the next screen. If the all the fields are not filled in and when the user clicks on next button the shouldn't proceed to next screen. I have two input fields ...
0
votes
1answer
34 views

Incorporate braintree in Salesforce LWC

I am trying to implement braintree in LWC , everything looks correct but not able to see the cmp on UI. below are the steps. Created Static resource as braintree and uploaded braintree JS library. ...
0
votes
0answers
19 views

Width of Quick Action in LWC (lightning__RecordAction)

Since Quick Actions can invoke LWC now, what is the approach of changing the width of the modal? I can't figure it out. In Aura components this was possible - <aura:html tag="style"> ....
1
vote
0answers
36 views

LWC event target data attributes propagation not working in Lightning Experience?

In a parent LWC component I am using a child LWC component like so <c-comp key={stuff.id} data-name={stuff.name} parameters={stuff.parameters} onresultavailable={handleResultAvailable}/> and ...

1
2 3 4 5
100