Questions tagged [create-lwc-app]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

LWC Select component to select value based on specific value in JS not HMTL

I have code right now below that selects the value based on the selectedindex of 0 or since I only have two options. What I am trying to figure out is how to set the select value instead of by 0 or 1 ...
1
vote
1answer
30 views

LWC Select component how to default value in JS not HTMl

I am trying to default the value of the select to a specific value based on a condition so I cannot just put selected in the html. I need JS code that will automatically update it. For this though I ...
0
votes
0answers
20 views

LWC OSS - Google Recaptcha - Shadow Dom

I'm working on implementing recaptcha into an LWC OSS app hosted in heroku. I've been succesful getting it to work using the following code. I am getting the error to add lwc:dom="manual" ...
0
votes
1answer
32 views

How to get value from Case.Account.Primary_Email__c and Case.ContactEmail from case recordID and autopopulated in To field on email page in lwc?

Controller_consumerSendEmail.cls public with sharing class Controller_consumerSendEmail { @AuraEnabled(cacheable=true) public static void sendEmailToController(String toSend, String subject){ ...
-2
votes
2answers
270 views

Call LWC @wire method on button click [closed]

I want to display a list of opportunities when a button is clicked. I have achieved the task using imparative Apex call but I want to do this with @wire method. HTML: <template> <...
0
votes
2answers
203 views

LWC : onchange Handler not getting fired when @track attribute is changed

I have two lightning input in a simple LWC component having respective onchange handlers and being @tracked with respective attributes. Second onchange handler is getting fired when I update second @...
0
votes
0answers
24 views

Notes Component on Campaign Member Layout

I see that the Notes component is available on most Objects except the Campaign Member Object. I'd like to add the notes component to the Campaign Member page layout and lightning page. Is there are ...
0
votes
1answer
214 views

Data table in LWC

Is it possible to achieve this in the data table in LWC? If yes please share some reference. If I select any rows under any category like the colour scheme and if I click save it should save. Please ...
1
vote
1answer
74 views

LWC Build Files Explaination

I have been trying to research this on my own, but I can't find a simple explanation that tells me the difference between the following 2 files: lwc.config.jsonhttps://developer.salesforce.com/blogs/...
1
vote
6answers
1k views

Unable to build Lightning Component source for markup://c:HelloWorldLightningWebComponent: Invalid suffix: json

I have created a project named "HelloWorldLightningWebComponent", and created a LWC component to it. While deploying the source to org from VSC, getting the error message. I have checked the ...
1
vote
1answer
107 views

Is it possible to use LWC-related npm modules & webpack to leverage the LWC framework with Cloudflare Workers?

I am hoping to use the LWC framework with Cloudflare Workers in JavaScript, but running into some issues. It seems like Wrangler ignores node_modules so I was hoping to use webpack in order to load ...
0
votes
1answer
63 views

How we can achieve navigation to another page in LWC OSS?

I created my first app using LWC OSS. I want to achieve the navigation from one page to another (url in the browser should change) I have two files created in LWC OSS app first file at src/client/...
0
votes
1answer
534 views

draftValues in lightning-datatable lwc

I have a lightning datatable html code <c-custom-lightning-datatable key-field="Id" data={sObjectRecordList} columns={columns} ...
0
votes
1answer
79 views

Nested loop is lwc js

I am facing a strange problem I have the following piece of code : const allUpdatedFieldsIncludingAccount = event.detail.draftValues; var tempUpdatedList = []; ...
2
votes
1answer
180 views

How to configure Socket.io to work with LWC OSS?

I am trying to use socket.io library with LWC OSS and followed the below steps: Created LWC OSS app using the command npx create-lwc-app my-app Installed socket.io library using the command npm ...
0
votes
0answers
108 views

Toast is not showing in LWC in community

import { LightningElement, track,wire } from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent' import Lead_Object from '@salesforce/schema/Lead'; import {...
1
vote
2answers
280 views

OSS SLDS + LWC Background Color

How do you change the background of an OSS LWC application using SLDS? I would like it to be something different than is pale blue. EDIT: I have tried setting the background via CSS, or changing the ...
0
votes
1answer
1k views

Make a field required in lwc form

I have created a lightning web component, which takes in two values LastName and Email and creates a Contact record. Here I have made the LastName as required html code <template> <form> ...
0
votes
0answers
72 views

Why isn't my LWC passing the values on submit to my apex class?

I've created an lwc that is called in a flow, but when I run it the form doesn't submit and the values aren't passing to the apex class. I can't figure out why. The form allows me to populate the ...
0
votes
1answer
25 views

Lightning Input fields

Can I create a lightning record form which is not related to any object it just checks the input values of the fields and posts the toast message. Example I want to create a quiz application wherein I ...
5
votes
1answer
629 views

Lightning Open source use of base components

A few days back an npm package for base lightning components was released Base Lightning Components With this I am expecting to use base lightning components like my favorite lightning-datatable in a ...
0
votes
2answers
3k views

Show and hide in LWC

There 3 records fetch by query and since I using iterator It shows 3 buttons as well whenever I click any show button it expands all 3 records I just wanted to expand only that record which button I ...
0
votes
1answer
23 views

Lwc showtoast multiple line

Does anyone know how to implement myltiple line in LWC showtoast? I only see workaround using aura but not lwc please help
0
votes
1answer
69 views

Query Selector is not working when I am putting inside renderedCallback Lifecycle hook in Lightning Web Component

I am creating a variable crashride and doing querySelector inside renderedcallback then I am using that variable inside another function. But if I directly say this.crashride inside the function ...
1
vote
2answers
402 views

Invalid mutation LWC

I'm trying to clone the array of records that is passed to the component and add some additional attributes to the cloned records however I always get the 'Invalid mutation: Cannot set "...
0
votes
1answer
67 views

Can't use lightning components in create-lwc-app

I created create-lwc-app (with Electron) and the build breaks when I try to use lightning-textarea for example (Module not found: Error: Can't resolve 'lightning/textarea' in .....'). Are those not ...
1
vote
1answer
739 views

LWC Component Tabs are not getting refresh, when moving back and forth on different tabs in the Lightning App [duplicate]

I created an LWC component with lightning-radio-group and added it to the Lightning App, it only shows which value is selected by the user. As I selected value and move the back and forth on the tabs ...
0
votes
0answers
159 views

LWC pub sub : subscribing component fetching stale data from apex

I am having two separate LWC components on the App Page. One is for adding Team members(Call it A 'members-skills') and other for showing all the team members(Call it B 'Team list'). Current ...
0
votes
1answer
356 views

Refresh button with time in lwc?

I have kept the refresh button my requirement is when I click the refresh button it needs to show the time for each time refreshing the page or record there is any resolved solution? Like this, I need ...
0
votes
1answer
239 views

Named Exports in Lightning Web Component

Can we have named export in Lightning Web Component? In ES6 module there are two ways of exporting module: Default Export Named Export I am able to find deault export in lwc export default class ...
6
votes
3answers
395 views

Is curly brace optional in lwc import statement

Below is my JS code in LWC: import searchBears from '@salesforce/apex/BearController.searchBears'; import { LightningElement, wire } from 'lwc'; I would like to understand why some import statements ...
1
vote
0answers
717 views

How to make font-awesome icons work on Lightning Web Components?

Downloaded the latest version of the Font Awesome Icons as a .zip file, I extract the files and uploaded the file all.css as a static resource in my scratch org. Below is my html <i class="fab fa-...
0
votes
1answer
750 views

how to pass data from form made on LWC to visualforce page

I've been trying to connect paypal with salesforce using paypal api: "https://www.paypal.com/sdk/js?client-id=sb&currency=USD"> the problem, i'm not able to implement this api in lwc but i ...
0
votes
2answers
402 views

how to pass data from child window to parent window using lightning web component

how can i pass the data from child window to parent window using lightning web component to populate the new window i used this code popup = window.open("fileName", "Popup", "width=600,height=700"); ...
1
vote
1answer
209 views

How to export flow to external website

I am trying to use flow in my local as mentioned here This is how the code looks like: And I'm getting this CORS issue: Access to XMLHttpRequest at 'https://casesrnd-dev-ed.lightning.force.com//...
0
votes
2answers
898 views

How to fetch new data in Lightning-record-form? LWC

I am facing an issue with getting the latest data on a simple search and update form that i have made in LWC. All i am trying to do is to search a case, get the details and then update it. It works ...
2
votes
2answers
956 views

Getting this error in the LWC Component? How can we resolve it?

<template for:each={fields} for:item="fields"> <tr class="slds-hint-parent" key={fields.id}> <td role="gridcell"> <div class="slds-truncate">{fields.value1}​</div> ...
5
votes
1answer
617 views

How to bypass immutable proxy objects when using an external and old jquery library in LWC

Please note I'm fairly new to LWC and even SalesForce (like barely 2 weeks into it). I'm trying to use SlickGrid with LWC, note that this jQuery lib was created over 10 years ago, and I got that ...
1
vote
1answer
467 views

How to set a unique class for each item in an iteration? (LWC)

In a Lightning Web Component, I am displaying a list of images. I want to change how the image is displayed on mouse over (hover). How can I determine which item from the list triggered the event? ...
0
votes
0answers
120 views

Hook into before unload of salesforce standard tab in lighting web component

Is there any way to detect and execute some JavaScript method before unload of salesforce standard tab inside LWC.
3
votes
1answer
202 views

Difference between create-lwc-app and SFDX cli

Hello Salesforce community, I'm not sure where to ask the question so I'll ask it here. I'm beginner with LWC and Salesforce (but senior as frontend developer). Can you explain me the difference ...
0
votes
3answers
2k views

Prepopulate values in lightning record form lwc

I’m trying to create one lwc component, where I need to prepopulate some values including lookup in lightning-record-form. Is it possible to do this in lwc?
2
votes
0answers
77 views

Run LWC open source app on HTTPS instead of HTTP

Hi I am playing with LWC open source and want to host it on HTTPS, default it is on HTTP. I ran the below to run app on http; npx create-lwc-app my-app cd my-app npm run watch App runs ...
2
votes
1answer
521 views

lwc-services is not recognized as an internal or external command

I am trying to run a hellow world app in LWC open source and after "npx create-lwc-app my-app" when I cd in the dir and run "npm run watch" I get the below error. E:\Development\LWC\workspace\dev>...
0
votes
2answers
2k views

How to create a custom lightning web component for Knowledge Articles to show article title and article body only?

I have been trying to create a lwc that will only show the article title and body within our community. so far I am running into some trouble with the lightning record view form commnd and assigning a ...
4
votes
1answer
199 views

lwc : npx create-lwc-app not working

I am running the command and getting the following error : npm ERR! code ECONNRESET npm ERR! errno ECONNRESET npm ERR! network request to http://registry.npmjs.org/create-lwc-app failed, reason: ...
1
vote
1answer
264 views

How to view new LWC?

I want to play around with the new Lightning Web Component announced earlier today. I have Node.JS downloaded and I'm running a local server, but I'm unable to see anything at the address '0.0.0.0:...