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
0answers
7 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
4answers
1k views

How to refresh the component in LWC after successful save of standard record page?

I am using a LWC which have lightning data table and edit button. This lightning datatable display contacts. If the click the edit button it will open edit contact modal pop up which is standard. When ...
0
votes
1answer
111 views

Refresh LWC component on successful save of standard edit page navigation

I am using lightning datatable where there are two actions EDIT and DELETE. When I choose the EDIT option I am opening the standard edit navigation as follows. <lightning-datatable class=&...
0
votes
0answers
8 views

How to hide/ change color of LWC outline to blend with the background

I have created three LWCs as shown in the image. I want the borders/blue outline to blend in with the background so one cannot tell they are different components. How can I do that? For some reason ...
3
votes
2answers
36 views

LWC - Iterating over arrays passed into the component by a parent is ridiculously slow

Imagine we have a parent component where we create an array like so: @track stuff = []; connectedCallback() { let newArray = []; for (let s = 0; s < 10000; s++) { newArray....
1
vote
1answer
27 views

Child component not refreshing when updating data from Parent Component

I am using a util lwc data table and passing list of records from the parent component, I am using a refresh button to re-fetch the records from Apex (imperatively) and update the LWC data table but ...
0
votes
0answers
18 views

Is it possible to Subscribe to Change Events without View All Permission

Scenario: I am currently making an lwc application and that app is subscribed in a ChangeEvent. The app is for user without 'view all' permission to the object. And since the user do not have view all ...
4
votes
1answer
834 views

Dynamically accessing iteration item properties in a Template iteration on lightning web component?

I would enjoy using the easy to set up lightning-datatable, but it just lacks any ability to really customize it. It would work, but I need text-wrapping in cells instead of truncation. And it lets ...
1
vote
1answer
547 views

Unable to select my custom login page from experience builder page at community's login& registration setting

I need my custom login page for community because standard login page can not freely customize. I created custom login page with aura component and embedded to my custom login page called as AnyTest ...
0
votes
1answer
26 views

LWC Upload File/Files to Multiple Contacts

I have a data table of Contacts on an Account Record Page and I am trying to use the modal component as a file uploader. Basically, you would select a contact or contacts, click the modal button, and ...
3
votes
2answers
947 views

Where does like & dislikes stores when we give knowledge article feedback

When we open any knowledge article in community then at the bottom we have an option like Was this article helpful? So when we click on like or dislike then on which object that count stores. I want ...
0
votes
1answer
25 views

Can I change the “lightning-record-form”?

Here is my code: <div if:true={showStepOne}> <div role="dialog" class="slds-modal slds-fade-in-open "> <div class=&...
3
votes
0answers
32 views

How to force cache refresh on community when releasing to production?

We have a community composed of multiple LWC. We are planning to release a big update in our production environment. When testing in other environments, some testers who had used the community ...
0
votes
1answer
24 views

Show Change Record Type in LWC

I would like to know if it is possible to show the change record type window in LWC. I have a lead record type that allow a user to enter info with minimal required fields. And then when this lead is ...
0
votes
1answer
34 views

Display static warning message upon LWC's creation

Is it possible to display a warning toast event msg whenever a component is created? Basically, without triggering it in any way, like with a btn click. .js showMsg(){ const evt = new ShowToastEvent({...
0
votes
1answer
16 views

How will i get the Date Time once the record has been opened in salesforce? I need this value to compare with LastModifiedDate in my Lwc component?

Here is my JS file of LWC : import { LightningElement, api,track,wire } from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; //import updateNotification from '@salesforce/...
0
votes
1answer
33 views

lwc lightning-checkbox-group - display checkboxes horizontally [duplicate]

Can I display the checkboxes horizontally using lightning-checkbox-group tag? <lightning-checkbox-group onchange={handleChange} name={...
1
vote
0answers
32 views

Lightning App Builder xml retrieve problem summer '21

after the Summer '21 release we have noticed that when we are trying to retrieve a flexipage that contains few lightning-web-component, all of these are removed from the retrieved manifest. This ...
1
vote
1answer
69 views

Not able to create a quick action using direct LWC in Summer 21 org

I have a requirement where I want to create an action using LWC component. But I am facing the below issue while creating the quick action As per the Salesforce release documentation, I have copied ...
0
votes
2answers
46 views

lightning-checkbox-group display horizontally

currently, I'm passing in a options array to the options attribute of a lightning-checkbox-group. I need to mimic the behavior of that tag, but I need to do it in html because I don't think I can get ...
0
votes
0answers
24 views

How to create a detail page button with LWC [closed]

My requirement is to create a custom button on the Opportunity detail page and when the user click on it a confirmation popup should show up once clicked on confirmation we need to make a callout and ...
2
votes
1answer
538 views

LWC Continuation SOAP API does not seem to be working

I`m trying to execute Continuation from LWC action. The thing is that I use it for SOAP API. It is a long-time running request, but I have to show a loading spinner until the response will be ...
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 ...
1
vote
2answers
1k views

How do I programatically add selected rows to a LWC datatable?

I have an action button in a LWC datatable. One of the things I would like it to do is to 'select' the row in the datatable when it fires. I can pass in pre-selected rows but I'm not sure how to add ...
1
vote
0answers
36 views

How to auto close LWC quick action from JavaScript?

I have created a Lightning web component quick action for account object in the Summer 2021 sandbox org. This is the screen action and working fine, but I am not able to close the action using ...
0
votes
0answers
26 views

Running SFDX: Create a Default Scratch Org doesn't create a scratch org

When I run the command SFDX: Create a Default Scratch Org.. it doesn't creating the scratch org, the banner of the command is still there and the command prompt doesn't show any error. Any help would ...
0
votes
2answers
560 views

How to get Custom Metadata Type PickList field values using LWC getPicklistValues and getObjectInfo

I'd like to access the picklist values of a field on a Custom Metadata Type from an LWC: import { getPicklistValues } from "lightning/uiObjectInfoApi"; import { getObjectInfo } from "...
0
votes
1answer
36 views

Can we use JSX in our LWC component with react application?

I want to build a chatting application in React and I want to use that functionality into my one of the component.
0
votes
1answer
31 views

Publish/Subscribe Message Service VS Parent to Child LWC

Quick theoritical question. I've read about the lightning message service communication between Lightning Web Components and it was specified that this type of communication is between unrelated ...
4
votes
3answers
564 views

Proper namespace syntax for importing static resource into LWC?

I have a static resource named 'myResource' that contains a javascript file 'myfile.js' I can correctly import like this: import myResource from '@salesforce/resourceUrl/myResource'; Then when I ...
0
votes
1answer
16 views

Change value in server

currently I have an error at function: yesButton which is: Uncaught Action failed: c:LCC_App_rej_Return_Shipment_c$controller$yesButton [Cannot read property 'Final_Approved__c' of null] My scenario: ...
0
votes
1answer
1k views

LWC:"ReferenceError: a is not defined at eval (eval at productFamilyOptions

getSettings method below returns settings JSON record and when i am trying to set picklist options using productFamilyOptions variable which is used as options of the .html file, I am getting this ...
4
votes
2answers
842 views

How to @wire an external Rest API call with LWC OSS?

I have created a basic project and simply want to pull a list of greetings from Google Firestore instead of using the default static array of greetings. My greeting.js file looks like this: import { ...
0
votes
1answer
29 views

How to determine if an option in lightning-checkbox-group in LWC is unchecked

How do I determine which checkbox in a lightning-checkbox-group is unchecked? I want to filter results based on selected checkbox. I have tried using both lines below in the onchange event ...
1
vote
4answers
771 views

Cannot read property 'split' of undefined - in LWC js

I have the following LWC, when I try to add on my lightning record page got some error like, cannot read property of split. js: import { LightningElement, api, track } from 'lwc'; export default ...
-1
votes
1answer
47 views

Generate Barcode Using JsBarcode library in lightning

Did anyone have used JsBarcode library in LWC in order to generate code 39 barcode, if yes can you please share a sample how I can use the library and generate the barcode. Till now the steps I have ...
-1
votes
0answers
22 views

How to create Lightning web component which will take LastModifiedDate as refrence to show pop up information? New to LWC, Please help if anybody can [closed]

This should be the condition of the toast message "LastModifiedDate should be greater then current date" Till Now I have created one Apex Class for logic but don't know how to use that in ...
-1
votes
1answer
29 views

Custom Button For Record Creation [closed]

I have a requirement to use custom button for record Creation of an object where i'll do some custom logic and it should ideally match the standard record creation Pop up . I can create a lightning ...
0
votes
2answers
31 views

@api Parameters and @wire Functions Ordering

Is there any guaranteed ordering of these two events in a child LWC: (1) Population of all passed @api properties (2) Invocation of @wire methods? In other words, are @api parameter values available ...
0
votes
0answers
15 views

Custom Lightning Page error only in FireFox .The Notification permission may only be requested from inside a short running

I have a fully developed and tested Custom Lightning Page which has a VF component and Several LWC components. Everything was done in Chrome and working fine. It is failing with the error message : &...
0
votes
1answer
33 views

Parsing JSON string value returned from APEX in LWC

I am receiving JOSN string in the following format {"data":{"meta":{"resultCode":null,"message":null},"data":[{"code":"$RFG","...
0
votes
1answer
44 views

Data not showing after selecting the picklist value in lightning

I have a picklist value account and contact when i select account or contact it will not showing me the data table of account or contact HTML <template> <div class="slds-form-element&...
0
votes
1answer
1k views

Error: Cannot find module '@salesforce/sfdx-lwc-jest/config' while testing my LWC from vs code

I have started my practice on LWC testing While i'm run this command:"npm run test:unit" i am getting this error:Cannot find module '@salesforce/sfdx-lwc-jest/config'. Error body is: Error: Cannot ...
0
votes
2answers
32 views

not able to use jsPDF autoTable plugin of jsPDF library

Hi Have below import statements import { loadScript } from "lightning/platformResourceLoader"; import JSPDF from '@salesforce/resourceUrl/jspdf'; import JSPDF_AUTO_TABLE from '@salesforce/...
2
votes
3answers
82 views

@track decorated property not updating LWC after imperative call

I can't seem to figure out what I am missing. I have a component that is supposed to display data after it receives an id of the exact record hence I am using an imperative call. I can see in the log ...
0
votes
0answers
24 views

can initialWidth of lightning datatable set dynamically lwc

I have a lightning datatable component which is reused in different parent components. I am trying to set initialWidth attribute on a column dynamically (varies for each parent component). However, ...
0
votes
1answer
24 views

Add JSON to array does not work in wire adapter

Here is a link to the code I have working: https://codepen.io/reuel3/pen/EMEGQy It works as expected there. I get an error message when attempting same thing in wire adapter function: [LWC component's ...
3
votes
2answers
7k views

How to use Lightning-Record-Form onError to display custom error message

Let's say I have a Lightning-Web-Component that uses lightning-record-form like this: <lightning-record-form record-id={recordId} object-api-name="Opportunity" fields={myFields} ...
0
votes
1answer
31 views

Issue in adding and removing rows dynamically in LWC

I am trying to add and remove rows in LWC, but every time when I click the tile it just add two tiles of that in another component. So every time when I click on the second tile it just losing its ...
1
vote
1answer
28 views

How to get the SObject type in LWC JS?

Hello I have an LWC which calls some apex that runs a SOSL search and returns a nested list of accounts and contacts. I'm iterating over the result set and building a single list of records to show in ...

1
2 3 4 5
96