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, { ...
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.
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 ...
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....
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....
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}.
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, ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lightning-web-components × 8427javascript × 1306
apex × 1094
lightning × 880
lightning-aura-components × 539
lightning-datatable × 425
lwc-wire-adapter × 420
html × 336
css × 326
community × 246
salesforcedx × 242
lightning-experience × 230
lwc-dom × 201
aura × 183
lightning-design-system × 179
visualforce × 171
slds × 167
lwc-jest × 165
visual-workflow × 144
js × 119
lightning-recordeditform × 107
wire × 102
lightning-combobox × 99
datatable × 97
navigationmixin.navigate × 93