Questions tagged [track]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
1answer
66 views

Basic Question about @track decorator

I have a (probably very) basic question about @track decorator. I modified the helloExpressions LW Component from Sample Gallery as below. Here the values FirstName and lastName are no longer ...
1
vote
2answers
74 views

LWC tracked variable not changing page

Hello so i am building my component which is suppose to display list. I am using foreach and tracked variable. So here is component html: <template> QuoteLevel {num} <lightning-button-...
0
votes
2answers
419 views

LWC: @track binding won't refresh component on value change

I have a component that picks up the value originally from the JS controller but won't refresh after I modify the value in the JS file. Component: <template> <div class={...
1
vote
1answer
51 views

LWC Access denied error referencing namespace problem

We have a JavaScript utility class containing two properties, like: class DateRange { start; end; constructor(start, end) { this.start = dateToIsoDateLocal(start instanceof Date ?...
-1
votes
1answer
339 views

A @track decorator can only be applied to a public field

I'm getting the following error from Salesforce whenever I try to create a Lightning Web Component app: Action.prototype.finishAction Error [Error in $A.getCallback() [Assert Violation: Compiler ...
5
votes
1answer
345 views

Array.push() on a @tracked array doesn't cause component refresh in lightning-accordion in LWC

This may be a duplicate of Array.push() won't update Lightning Web Component View However, that is for an @wire case, while this is for lightning-accordion. I am attempting to use the lightning-...
5
votes
1answer
1k views

Array.push() won't update Lightning Web Component View [duplicate]

We are migrating over to Lightning Web Components in the last couple of weeks now and we had some struggles with the arrays in Javascript. On a trackable array, when I call push in a wiredMethod, ...