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.

1,645 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
541 views

Embedded Chat not working in IE and Edge browser with Web components bundle.js

We use web components for header and footer in our application. When we try to integrate Sales force embedded chat, it's working fine in all browsers except IE11 and Edge. When we remove ...
0
votes
0answers
101 views

Is there a way to just refresh the lightning custom tab while saving a record in the lightning component?

[![<aura:component> <aura:attribute name="oppRecordId" type="String" access="public"/> <aura:attribute name="recordId" type="String" access="private"/> <...
0
votes
1answer
734 views

Error on browser resize after using JQuery in a LWC

I am porting an existing app that uses JQuery to insert HTML into a Lightning Web Component when it is sent a formId via pubsub from another Aura or LW Component. The sfEnv object is for sharing data ...
0
votes
2answers
445 views

lightning-input-address embedded in VF page. Address lookup not working

I have a use case to embed a lightning web component in a VF Page (in Classic) which includes a lightning-input-address component. The component includes the standard address lookup input (which ...
0
votes
0answers
783 views

onchange event not triggered on removal of last character - LWC

I need to display the count/length of string entered in a text box as and when changed(addition/subtraction of new characters) using LWC <template> <lightning-input ...
0
votes
0answers
541 views

onclick lightning button key-field value return undefined in js

Actually i have following template: <template for:each={Orders.data} for:item="ord"> <tr class="slds-hint-parent" key={ord.Id}> <td> <div class="slds-truncate" key={...
0
votes
0answers
201 views

Lightning Web Components - track user (insert visit record) after login

We use lightning communities. I am working on building a new LWC component, where I can place it in the page footer. The goal of the component is simple: once the user logs in, visits a page in the ...
0
votes
0answers
134 views

View Quick Action Lightning Component as pdf

I have this below lightning component from where I am calling a lightning web component. This lightning component is called from quick action. I need to print this content as pdf. When I click the ...
0
votes
0answers
31 views

Change width of standard Lightning quick action lightbox

Standard Lightning Lead Convert lightbox has wider window than standard lightbox. Is it possible to change it via standard settings?
0
votes
1answer
274 views

Does exist an expression lightning component and/or expression lightning web component equivalent to SLDS expression?

In the SLDS documentation, I've found a whole page about expressions, how to use them and how to make them similar to the ones implemented in Salesforce UI. Does exist something similar as a ...
0
votes
0answers
897 views

Lightning web component: get a count of custom object from the controller to the HTML Page

I'm trying to pass a parameter which is an account field to a soql query(which is just calculating the count on this custom object based on the account field). And I'm trying to retrieve this count ...
0
votes
0answers
373 views

LWC can't call apex with large body size > 3 Mb

I am getting Error: Received exception event aura:systemError from server somewhere inside of aura_prod.js when call apex with large body (>3Mb). import upload from '@salesforce/apex/Upload.upload'; ...
0
votes
1answer
455 views

LWC Warning with <lightning-record-form>

I'm implementing a simple lightning web component with and I could see the below warning in the browser console log. Can anyone help me understand why this is happening? [LWC warning]: If property ...
0
votes
1answer
302 views

Unable to access custom label value in lightning web componnet

import labelname from '@salesforce/label/myNamespace.labelName'; Error: I was unable to deploy the above statement, Explicit use of namespace "myNamespace" in file "scheduleConfig.js" is ...
0
votes
0answers
65 views

Issue while iterating lightning-tab, as expressions can't be used

I have this code where the number of tabs is equal to the length of seasons array. The scenario is I want to display the label of the tab based on some condition, something like as below: {season.name}...
0
votes
0answers
119 views

Salesforce LWC to Application Connection

We are working on an application using LWC. The issue we are having is getting communication between the LWC and the main app. We have tried using a json post to the application is there a more ...
0
votes
1answer
1k views

How to add css to override existing styling in lightning component

I am using an existing lightning component that displays some checkboxes. I am wondering if there is a way to reduce the size of the checkboxes. <design:component > <design:attribute ...
0
votes
0answers
1k views

LWC Lightning-DataTable row Actions Error

Let's say I have a LWC with the following JS controller export default class Approvals extends LightningElement { @track pendingApprovalHistories =[ { Name : "Han Solo", CreatedDate : "...
0
votes
0answers
84 views

Cannot use custom LightningElement in Custom Tab (Settings page) - Error in the server action response

Cannot render lwc component for settings page in my app, It's sample Lightning element and it works fine with my widget, but i cannot add any LWC on my settings page (custom tab/flexipage). I got ...
0
votes
0answers
109 views

Unable to rerender a lightning component once the apex method is called

I'm building a lightning component using the new Lightning Web Component framework, the component retrieves information from a custom setting with three checkboxes, once the user changes the values of ...
0
votes
0answers
544 views

Bind Lightning Web Component SObject Variable to Input Text Area

I am trying to migrate an Aura Component to a Lightning Web Component. I am storing an sobject called "Approval_History__c" as a @track property called currentUsersHistory I have an input ...
0
votes
1answer
1k views

Web Component can't find variable `require`

I am trying to use the json2csv javascript package in my Salesforce Web Component, but I get the error: can't find variable 'require'. I've uploaded the json2csv package as a static resource and am ...
0
votes
0answers
861 views

Failed to load resource error

I pushed my new LWC to the scratch org, but I encountered to following error while attempting to load the page containing the LWC. Failed to load resource: the server responded with a status of 503 (...
0
votes
0answers
85 views

No functions defined in JS files in a zip file uploaded as a Static Resource

I am attempting to use the D3 JavaScript library in a Web Component, but am having issues getting any method to work. I have downloaded the d3.zip file from the link above, and have attempted to ...
0
votes
1answer
238 views

Showing youtube video tiles in Lightning web components

I am currently migrating a vf page into Lightning web component, the vf page used to show the youtube video tiles on the page. But when I am converting it into a LWC component then it is throwing ...
0
votes
0answers
765 views

Lightning Web Components: .eslintrc.json and jsconfig.json missing in lwc folder

I am trying to implement this(https://trailhead.salesforce.com/content/learn/projects/quick-start-lightning-web-components/create-a-hello-world-lightning-web-component) with VS code. However, I am ...
0
votes
2answers
690 views

Lightning Design in vf page

Can I use lightning design in my existing vf pages. Based on salesforce trailhead I can see it uses most of the CSS like tag, but in my vf page I have visualforce tag which I believe as of now not ...
0
votes
1answer
22 views

put text inline aside a checkbox

I am desperately trying to put a h1 element right by the side of a checkbox, and I can't seem to do it. <div> <lightning-input onchange={select} type="checkbox" name={index}>&...
0
votes
2answers
108 views

LWC combobox can't load values from custom object via apex controller

I'm tring to load records from a custom object into a combobox for selection, but it is just blank. component.html <template> <div> <div class="slds-p-around_medium lgc-bg&...
0
votes
1answer
235 views

Data table count rows in lightning web component from server side

I'm having a hard time on how to use count in lightning web components. I just want to count how many Active users and how many Inactive users. Can someone please help I'm having a trouble in ...
0
votes
1answer
1k views

Javascript Object Constructor in LWC

How would one go about creating a javascript object (not literal) in LWC? i understand the standard syntax of something like function bar(dog, cat) { this.dog = dog; this.cat = car; this....
-1
votes
0answers
53 views

LWC Lightning-input-field not showing lookup correctly

I have a LWC where I am using lightning-input-field to display a custom field on custom object which is a look up to other object, it doesn't display correctly. Here's the code : <lightning-layout-...
-1
votes
1answer
74 views

LWC - NavigationMixin not working

I'm trying to get the NavigationMixin plugin to work in my Lightning Web Component. I'm following the instructions listed here but its not working, even though I'm copy-pasting the code from the ...
-1
votes
1answer
100 views

No data is showing connectedcallback() method

I am creating a data table based upon the return from the apex. I am calling this component from another component and passing the recordid. Component 1: <c-compoennt2 con-id={recordId}> ...
-1
votes
3answers
475 views

Calling a standard quick action via LWC

The Title says it all , so apparently I have a custom LWC component in a record page , is it possible to have a button there that opens up the standard new dialog functionality? I am thinking of ...
-1
votes
1answer
34 views

How to put the text in next line without having space in between

I am working on the req in which i need to put the text in the next line without any space between them i am trying to use the tag but it is creating unwanted extra space between the line can i get ...
-1
votes
2answers
443 views

How to deserialize in Java script

I have a string returned into js from a wrapper class and want to desrialize and change to list<string> but not be to convert. I have tried the below code . var listData = (list<string>)...
-1
votes
4answers
3k views

Get URL parameter from LWC

I'm trying to retrieve url parameters through a lightning web component(Using LWC Components in Visualforce Pages) For exemple : wwww.my-salesforce.com/EnrollmentForm?EnrId=4487855adff78 How can i ...
-1
votes
2answers
80 views

How to access the content of 3rd part script with loadscript?

Given the code below, how do I do to have access to ImmutableJS content after the execution of loadscript function? import immutableJsStaticResource from '@salesforce/resourceUrl/immutable_3_8_2'; ...
-1
votes
1answer
667 views

The component must be marked 'isExposed=true' as it is being used on a Lightning page

i am trying to move a LWC component from one sandbox to another. when i am deploying the changeset i get this error The component must be marked 'isExposed=true' as it is being used on a ...
-1
votes
2answers
77 views

Custom Lightning Components - Pass record related information from one community page to another

How to pass value from one community page to another page in custom Lightning Components: variables:  explanation bId  -> recordId accessIssue ->record write information (true/false) values   ...
-1
votes
1answer
35 views

I have button which are repeating so i want to change the color of button which i selected how do i do this

<template for:each={FixtureData} for:item="item"> <lightning-button style="padding:6px 12px;margin:0 0 [![enter image description here][1]][1]15px 0;...
-1
votes
1answer
1k views

LWC not refreshing related list count after creating new record

On contact object, the standard new button is overridden with a LWC component. From account object i try to create contact. Before creating contact count is 1 After creating a contact, it sill show ...
-1
votes
1answer
519 views

Using a lightning-record-edit-form to show a form in modal to create record in lwc

How can i display error message that will come on submitting the form and also how will can we Handle creating a new record in lwc anyone has any examples ? PS. I am using lightning-record-edit-form ...
-2
votes
1answer
34 views

Avoid error on extending an LWC

How the following error can be avoided $A.getCallback() [TypeError: Class extends value undefined is not a constructor or null] Failing descriptor:" {ltng:outApp} ? The base component import { ...

1
29 30 31 32
33