5 votes

How to prevent LWC Wire from loading data automatically?

Wire methods with reactive properties don't call Apex until their reactive values are set to any value other than undefined. In other words, if you do this: someProperty; @wire(someMethod, { ...
sfdcfox's user avatar
  • 481k
4 votes
Accepted

How to prevent LWC Wire from loading data automatically?

Don't call it via the wire service. Call the Apex method imperatively in your button's onclick handler.
Wes Lyons's user avatar
  • 146
2 votes

LWC Invalid Mutation error when copying data from a @api property

part.IsReplace = false is a mutation of the object. You need to copy the object. Typically, when I add a field, I'll use the ... operator to copy the existing object and add new properties at the same ...
sfdcfox's user avatar
  • 481k
2 votes
Accepted

Dynamic Question and Answer form

This is happening because you're keeping separate arrays for questions and answers. The data came in correct form from apex, it was already linked, so there's no need to divide it. this.data = result....
Sachin Hooda's user avatar
  • 1,510
1 vote

How to handle item selection from a list that behaves like a combobox in LWC?

There are two problems with your code i see. LWC does not support getElementById. lwc class properties are reactive meaning when you update their value the DOM will re-render and shows updated values....
Sachin Hooda's user avatar
  • 1,510
1 vote

LWC Template tag not working for conditions

Do not use spaces after the : or =. It must be if:true={isFlagValue}. Note that if:true and if:false are deprecated. You should instead use lwc:if, as in lwc:if={isFlagValue}.
sfdcfox's user avatar
  • 481k
1 vote

Change Data Capture and LWC on Mobile App?

As per the documentation - The lightning/empApi module is supported in desktop browsers with web worker or shared worker support. It is not supported in the Salesforce mobile app. As an alternative, ...
pk1772's user avatar
  • 133
1 vote

Share Content Version to Admin Users

Based on this docs, which was also mentioned on this question, it says: Note: Depending on how files are shared, queries on ContentDocument and ContentVersion without specifying an ID won't return ...
Carl Ortiz's user avatar
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. Use these methods on the modal.js stub for selecting DOM elements inside the ...
Matthew Souther's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible