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
50 views

LWC Template if:true Directive not working

I'm trying to conditionally hide the lightning-tab,using if:true directive .The "courses" array is populated or empty using @wire adaptor.I am trying to use if:true condition to check if ...
0
votes
1answer
24 views

Accesible Label and Input in LWC

When using standard HTML label and input tags the label and for"username" is not working as expected. From what I can see the ID for the input is being changed when the component renders to ...
0
votes
0answers
20 views

Popover over and out a Modal

I have a modal with a table(the structure is composed of 4 nested LWC, the first is the modal container, the second is the wizard for custom opportunity creation, the third is a table and the fourth ...
0
votes
0answers
15 views

Margin Padding issue on LWC

I set up a parent component that integrate multiple other component. In the meantime I have with space cause by margin and paddding issue in the slds-card__header slds-grid. Have a look: Those margin ...
0
votes
1answer
19 views

error.length is throwing an error in HTML of LWC

Hi I am trying to render a component on the basis of the length of the track property but it is throwing an error of of not supporting. kindly help. Below is the code : <template if:true={error....
0
votes
1answer
20 views

How to modify values in object lightning web components

@track defaultRecordWith4Field = { recId : 0, fieldList : [ { name:"description__c", value :null },{ ...
0
votes
0answers
13 views

Financial Service Cloud relationship map in force.com platform

I'm looking out for a FSC relationship map like component that I can use in a custom aura/lwc cmp (force.com platform). I was not able to find any such existing lightning component in the standard ...
0
votes
0answers
18 views

show list of account record on clicking in checkbox and delete the selected account and refresh list

I want to show account record on checking a checkbox and delete the selected record and refresh list but I am getting errors. duplicate value found: duplicates value on record with id: Cannot find ...
1
vote
2answers
148 views

Why does my wire value return null when running in connectedCallback method?

I have an LWC component on a record page which generates a signed URL for an external system, in order for my Apex method to generate the signed URL I need the Order Number from the Record (Order....
-2
votes
0answers
16 views

Trying to use jQuery Plugin - TimePickie - geting error - [Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.] [closed]

I'm trying to use below Jquery Plugin in my LWC: http://senthilraj.github.io/TimePicki/howtouse.html I am able to load scripts and styles however, I'm getting error when it gets successfully loaded. I ...
1
vote
1answer
26 views

Uncaught (in promise) TypeError: Cannot read property 'item' of undefined; Asynchronous APEX calls

When loading some data in my HTML I get an error: Uncaught (in promise) TypeError: Cannot read property 'item' of undefined which mean that there is something I do not understand regarding the Wire ...
2
votes
1answer
35 views

SFDX - LWC1001: Unexpected compilation error: did not find a shallow_cmp function for AST_Chain

Problem: After developing 4 LWC components then deploying to a scratch org via SFDX: Push Source to Default Scratch Org, the Salesforce CLI returns: LWC1001: Unexpected compilation error: did not find ...
0
votes
1answer
26 views

Apex call from LWC, data looping

I am quite new to APex and LWC and I am not sure how to format my code I would like to trigger an apex class from a loop if it was another LWC I would do but since it is from the same component I am ...
5
votes
1answer
53 views

How to let the end users override CSS of managed package's LWC?

I am rewriting a complex Visualforce component into LWC. It's an activity timeline / Gantt chart that's part of a managed package. The old version let the end users override the bar colo(u)rs with a ...
0
votes
1answer
31 views

What gets imported from '@salesforce/user/isGuest'?

import isguest from '@salesforce/user/isGuest'; What does this line mean? I don't see any user isGuest created in org. Where can I look to find isGuest in org?
0
votes
1answer
38 views

Can I add an LWC component from Scratch Org to a managed package?

I am a newbie and I am faced with the following task: to set a namespace prefix for my organization, as well as to create a managed package, develop an LWC component and add it to a managed package. I ...
1
vote
1answer
61 views

Lazy loading lightning combobox lwc

I have a 'veryBigArrayWithData' that can have thousands of records. When clicking on a lightning-combobox to load label-value pairs from this array, the page becomes unresponsive due to the big ...
1
vote
1answer
59 views

Inline Editing field needs to be required field in Lightning Data table - LWC?

I have a lightning data table displaying a set of Records. Also, it have inline editing set true for one column called Price. Is it possible to have the Price column as Required while editing? My Cmp ...
1
vote
1answer
46 views

Populating a combobox with Salesforce data

I want to create a component with one input box with type="date" and a combobox that gets populated with options after a date is selected in the first input box component. I want this to ...
0
votes
1answer
23 views

Why is the button icon not displayed?

Here is the code of my html file in LWC: <div> <lightning-button label="Update" onclick={connectedCallback} class="slds-button_icon"> <svg class="...
2
votes
1answer
28 views

How to get old/previous Value which entered in input text field with onchange() event in LWC?

How to get old/previous Value which entered in input text field with onchange() event in LWC ? please help
0
votes
0answers
13 views

How to get translated picklist value of a picklist field in LWC [duplicate]

Is there any standard capability using method/Api/Wire to get the translated value as per user language in LWC. Regards Stay Safe
1
vote
0answers
40 views

Use data from previous page in Lightning Community with lwc

We have a Community made up of 2 pages, using lwc and also Apex (for org queries and API calls). We go from one to the other with Navigation Mixin. On the first page, we get a lot of data from Apex ...
0
votes
1answer
48 views

Insert a large file ( 9MB) from a LWC into a Case

I am trying to upload a file ( that has for example 4.9 MB) and my component throw an error, although everything is working fine with smaller files ( up to 3MB) ! I know I must update the logic in my ...
1
vote
1answer
44 views

Retain LWC output values in Flow Screen when Flow Screen has invalid input in other field

Scenario A flow screen with a normal text field (call it field A) and a picklist LWC that takes some default value and stores an output variable based on user interaction. When field A has an input ...
0
votes
1answer
53 views

SessionId in LWC for Security Review

I am using this workaround to get the SessionId in my LWC and perform a callout from the JS. I am concerned about if it will pass the security review for managed packages. Have someone used it and can ...
0
votes
1answer
20 views

Where should the apex tests be located in the LWC project?

I wrote an Apex test (in the Developer console) for a method that is used in my LWC project. How do I upload it to my project in VSC?
0
votes
1answer
20 views

How can i put white-space in combo box in lightning

In this attached image the text of the list is too long and it is not fully coming how can i break that? {...
0
votes
1answer
19 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. &...
0
votes
1answer
25 views

Receiving [object Object],[object Object] [object Object],[object Object] values in LWC component

Here is my code where from LWC I am passing params to apex it then returned back to LWC but in the component it is showing [object Object],[object Object][object Object],[object Object] //APEX public ...
0
votes
0answers
23 views

I want to pass list of selected Ids using custom list button to LWC from Visualforce. Please help me with the same. It's a bit urgent

There is an Object called Assessment. I have created a Custom list button for the same and called my VF Page: ENT_Update_Assessment_Registrations : Code is as follows <apex:page StandardController=&...
0
votes
2answers
41 views

Multiple Users and LWC Data Refreshing

How would I update the data/view of another user when one user makes changes to a record via a lightning-record-form LWC? For example, User 1 edits an Account record and changes the phone number via ...
0
votes
1answer
34 views

How to refresh the cache with refreshApex for Apex method imported from ES6 module?

I have implemented the custom datatable component(the child component c-custom-table not shown in this post) that is dispatching the event once the record have been successfully saved. parentComponent....
0
votes
0answers
30 views

Retrieving list of products using messageChannel Service

I have two LWC components one is publishing the event and the other is subscribing. They both are working fine but after subscribing I want it to invoke the apex, but it couldn't return the output, as ...
0
votes
1answer
29 views

Utility icon not showing

I am using below line of code to show the icon but instead it is showing as a dot. Tried on chrome and edge. <lightning:icon iconName="utility:warning" alternativeText="Warning!"...
1
vote
1answer
49 views

Error when I want to display list of account when checkbox is checked

ShowAcct.cls public with sharing class ShowAcct { @AuraEnabled(Cacheable=true) public static List<Account> getAccountList() { return [SELECT id,name,AnnualRevenue from Account]; ...
1
vote
0answers
30 views

Date convert from DD/MM/YYYY to yyyy-mm-dd

This will not convert my date dd/mm/yyyy to yyyyy-mm-dd that I send through the frontend. HTML <div if:true={isMobile} class="slds-size--1-of-1 slds-large-size--1-of-2 padding_10"> ...
0
votes
1answer
37 views

How to pass FILE as a parameter to external js library from LWC?

I have a requirement to add watermark to the uploaded image. My HTML file is straight forward <template> <div lwc:dom="manual"></div> <lightning-card title="...
0
votes
1answer
30 views

How to solve the problem of Uncaught Typescript Error?

I'm new in LWC and especially in JS... Have a problem with toasting message in upload file custom component. part of code.js const {base64, filename, recordId} = this.fileData ...
0
votes
0answers
16 views

How to get selected Rows draft value in LWC?

I have created a data-table where it contains nested data now if i click first rows first time ill get the drafted values by clicking any of the rows in second time. I'm not getting the drafted value ...
0
votes
0answers
19 views

How to break line for mobile view in lightning web components

In the top I have a text i.e too long and it will not fully displayed how can I break that text? I have attached my code also
0
votes
1answer
25 views

Can I place the icon in front of the lightning-card header?

I have the following code in the html of the LWC component and I want to replace the standard icon in it with the one that I downloaded and added to static resources? But I can't do it, the icon is ...
0
votes
2answers
30 views

Error while using custom events in lwc

I am trying to setup child to parent communication in lwc but i get error No MODULE named markup://c:customEventChild found : [markup://c:customEventParent] CustomChildEvent.html <template> <...
0
votes
1answer
23 views

Stage Picklist on Opportunity Not Shown by LWC

I am trying to show stage picklist values of opportunity object through lwc but iit shows error Invalid reference Opportunity.Stage of type sobjectField in file lwcPicklistOppor.js here is my code <...
1
vote
2answers
80 views

Upload and store 50 MB file from LWC

I have a LWC that, is retrieving the body of an attachment using apex. This is retrieved just as blob, because handling it in Apex would hit limits such as String too long os Heap Size exceeded, cause ...
0
votes
1answer
19 views

URL Parameters not being captured in state property onload

I'm trying to pass certain information on click of button from one community page to another through state property of Navigation Mixin. I'm able to successfully navigate to the next page ,however ...
0
votes
0answers
11 views

Access Aura Elements outside of Aura

Objective: I'd like to make changes to some Lightning pages that use Aura components using Tampermonkey/Greasemonkey in order to streamline my workflow. Changes such as adding extra buttons, links, or ...
0
votes
0answers
27 views

Align right side toggle button and button in LWC Component

Could you please help me to align right side(close to right side border) toggle button, button and help text. Currently it is showing close to center. HTML Code <template> <lightning-card ...
0
votes
0answers
21 views

Faced issue in installing sfdx plugins:install @salesforce/lwc-dev-server

i am trying to view component locally in vs code but when i run sfdx plugins:install @salesforce/lwc-dev-server this command i get error C:\HelloWorldLightningWebComponen>sfdx plugins:install @...
0
votes
0answers
19 views

How to get recordId of row on mouseover in lightning-datatable LWC

How to get recordId of row on mouseover in lightning-datatable LWC. event.detail is coming as 0. I need this feature for custom popover for each row. <lightning-datatable key-...

1 2
3
4 5
96