New answers tagged

1 vote

How can I test that my component, which implements the standard modal components, is working properly?

@TemporaryFix's solution works, but following the docs for lightning-modal, we should use a slightly different approach. You're meant to use these methods on the modal.js stub for selecting DOM ...
Matthew Souther's user avatar
0 votes

LWC CSP script-src self error

I ran into a similar issue (doing this from within a modal). My fix was to use event.preventDefault();. So your method would look something like: setSelectedStage (event) { this.selectedStage = ...
veritascs's user avatar
  • 191
2 votes
Accepted

How to clear LWC lightning-textarea in javascript

this.template.querySelector('lightning-textarea').value = ''; This should work, if you have one lightning-textarea. If you have several, it affects the first found. But querySelector fell out of ...
Felix van Hove's user avatar
0 votes

Wrap LWC in Aura so it can be opened on click of a button in a pop-up window

Aura is visually very similar to LWC. You have a top-level component, and you'll have your LWC component in the markup. <aura:component implements="force:hasRecordId,flexipage:...
sfdcfox's user avatar
  • 481k
1 vote

Why Salesforce doesn't provide router for Lightning Component(LWC, Aura)?

Salesforce doesn't provide a built-in router for Lightning Components (both Aura and Lightning Web Components) similar to what is available in some other web frameworks. However, you can implement ...
Nayan Kaslikar's user avatar
2 votes
Accepted

Trouble loading PDF.js lib in LWC

When you do loadScript you need to point it to the .js file in your static resource, not just the folder name. For example, instead of loadScript(this, pdfjs), you need to do loadScript(this, pdfjs + &...
fred's user avatar
  • 2,753
2 votes
Accepted

How to remove the row from a lightning data table

That code is just wiping out the table data entirely. Instead, you will want to use Array.prototype.splice with exactly two parameters, the index to start at, and the number of elements to delete (1). ...
sfdcfox's user avatar
  • 481k
0 votes

How to set default picklist value for lightning-combobox?

To set the default value of the lightning-combobox as the first picklist value, you need to modify your JS code slightly. You need to assign the value property of the combobox to the value property of ...
Tushar Jadav's user avatar
1 vote

Issue embedding link in custom label in LWC

To display the HTML link you need to use lightning-formatted-rich-text component as below. <lightning-formatted-rich-text class="myClass" value={errorText}></lightning-formatted-...
Saroj Bera's user avatar
  • 14.6k
0 votes

Ajax Toolkit remoteFunction Returns Timeout and Page not Found errors

External calls must be done via APEX for security reasons.
Искрен Станиславов's user avatar

Top 50 recent answers are included