Questions tagged [lwc]

For questions about Lightning Web Components (LWC) - the UI framework for the Salesforce platform. When using this tag also include the more generic [salesforce] tag.

503 questions
5
votes
3 answers

Lightning Web Component Specialist Super badge: Challenge 7

I am having trouble solving the Challenge 7 I have the required imports as well as required functions in the JS file. Still #Trailhead giving error: We can’t find the getLocationFromBrowser() function in the component boatsNearMe controller. Make…
Somya Tiwari
  • 145
  • 3
  • 8
5
votes
5 answers

Pass value to lightning-input tag in LWC

Does anyone know how to pass checked value to checkbox in Lightning Web Component? My code looks like: import { LightningElement, track } from 'lwc'; export default class MyComponent extends LightningElement { @track isChecked; …
lizalav
  • 51
  • 1
  • 1
  • 3
4
votes
2 answers

AWS Dynamo DB Free Tier Limits

I am new to DynamoDB, and I have a small in house application, which will be used by my parents for their small business. I just have to keep records of 10 - 20 rows daily, and will have a few edits close to 5 - 10 at max. WIll I be able to use the…
4
votes
0 answers

How to handle Unsaved Changes in LWC component?

I am trying to implement unsaved changes functionality in the LWC component. Tried various approaches including using javascript & jquery and tried to fire it onbeforeunload but things don't seem to work. The same works on the HTML page but not as…
4
votes
2 answers

LWC test using jest testing framework throws error - unknown public property "smalldevicesize" of element

While testing LWC in VSCode using jest script, unable to render custom LWC component, it throws an error- Unknown public property "smalldevicesize" of element . This is likely a typo on the corresponding attribute "smalldevicesize". Here is the…
3
votes
1 answer

Custom picklist field in Salesforce LWC not able to Save and not able to access updated value (Default Save button not appearing)

I successfully implemented Custom Picklist field functionality using Salesforce LWC. All values from picklist are loading properly in drop down. But when trying to save records after drop down change, deafult Save button not appearing. And If I am…
Mr.DevEng
  • 2,651
  • 14
  • 57
  • 115
3
votes
0 answers

Configuring Salesforce LWC Local Dev Server on MacOS / Chrome - 500 Error When Calling Apex with Wire

I'm working on a LWC (lightning web component), and have been using the Salesforce Local Development Server successfully, until the point where I use a wire call to invoke the Apex function. I am getting a server 500 error, and it saying that the…
Brendan McDonald
  • 313
  • 3
  • 13
3
votes
1 answer

Problem with Trailhead "Get Hands-On with New Alert, Confirm, and Prompt Modules and Components"

I can't to complete challenge "Get Hands-On with New Alert, Confirm, and Prompt Modules and Components". I'm pretty sure this challenge have a bug and I want to know I made a mistake or this is challenge have bug. The assignment: import {…
3
votes
1 answer

How to import LWC component from ORG to VSCODE?

I am having some difficulties importing LWC components from org to VSCODE. Is it the right way? Here's what I am following - Created a new Manifest project. Connected to my sandbox org (not scratch). Right clicked on Package.xml under Manifest &…
3
votes
3 answers

Salesforce, LWC, Lightning App Builder, Cannot read property

I created component as Lightning Web Component. In VSCode it's ok. When in Lightning App Builder I added this component, there is a bug: "Error during LWC component connect phase: [Cannot read property 'fields' of…
Elo
  • 226
  • 5
  • 19
3
votes
1 answer

LWC1079 Expected root tag to be template, found meta

Found this code online as an open source and I've been trying to convert it to a LWC. The code is in HTML, CSS, and JS. Am working on it in visual studio and am using a salesforce extension pack that doesn't accept HTML, it needs tags but I have…
3
votes
2 answers

Is there a way to pass multiple (and different) parameters to an Apex Controller class from JS in Lightning Web Components (LWC)?

I'm currently stuck at a problem and was hoping someone here could help me. I also certainly hope this is the right place to ask it. I'm trying to create a custom Invoice record with its corresponding Invoice Line records upon firing an event. I…
Sid Fortunato
  • 33
  • 1
  • 1
  • 7
3
votes
1 answer

Synthetic LWC Shadow DOM Slots vs Native shadow DOM Slots

The LWC synthetic shadow dom doesn't seem to handle slots like the native shadow dom implementation e.g. Let's say you start with a element:

Hi there

Then you attach the shadow dom and add a slot, the h1 will be…
2
votes
1 answer

Field Dependency implementation in Custom Picklist field type using LWC giving `[NoErrorObjectAvailable] Script error `

We are trying to implement field dependency in custom picklist field type with LWC. For this I created one LWC component to define custom lightning datatable. And I am using custom picklist fields which are dependent. Dependent fields are country…
Mr.DevEng
  • 2,651
  • 14
  • 57
  • 115
2
votes
0 answers

LWR Site (Build Your Own) - Issue accessing 3rd party library loaded from Static Resource that depend on the window global object

I have created a LWC component that loads a third party library from a static resource. Here's an example of the library: window.myLib = (function() { return { myFunction: function(a, b) { return a * b; } …
1
2 3
33 34