A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating. What should the developer change in the code above for this to happen?
A. Add the @track decorator to the data variable.
B. Create a new variable to store the result and annotate it with @track.
C. Create a variable to store the result and call refreshApex().
D. Call refreshApex() on this.data.
Suggest answer: D
Reference:
No comments:
Please share to make the community better.