New answers tagged

1

As a performance matter, do not use for-index loops in LWC within Salesforce, or you'll suffer extreme performance penalties. You do have a nested loop, so the best way to do this is a nested map operation: let tempAllRecords = this.allOppList.map( innerList => innerList.map( innerItem => ({ ...innerItem, B: event.detail.checked }) ) );


2

@track itemsForCurrentView = applications; The value will only be assigned once, so it won't be reactive. @wire(getLoanApplications) applications; You need to pass in the filter properties, if any, and make them reactive: @wire(getLoanApplications, { filter: '$currentFilter' }) applications; If you need to do any post-processing, do it with a handler: @...


5

Reactive properties are not $this.whatever, but rather just $whatever: @wire(getPicklistValuesByRecordType, { objectApiName: '$objectName', recordTypeId: '$recordTypeId' }) Reactive variables can only work on class properties, so the wire service presumes that you meant this.


1

It turns out that the error was actually in the lightning-layout-item tag. I had the size attribute set to a string - small, instead of a number. Adjusted code: <lightning-layout-item size="3" small-device-size="6" medium-device-size="4" large-device-size="3" key={boat.Id} padding="around-small"> ...


0

You have some problems with your code, including: this.currentPage === this.currentPage - 1; This should be: this.currentPage -= 1; Or: this.currentPage--; for(let j=firstItem; j<=lastItem; j++ ){ this.currPageList[j]= this.fieldsDescribeResult[j]; } Is wrong, it should be: this.currPageList = this....


1

What you can do is, when you are retriving the data in handleSync you can add the data into two attributes. For example: this.dataList = finalData; this.databackupList = finalData; //to save the backup of data you are retriving using handleSync function and then you can filter using this.databackupList. For example: this.dataList = this.databackupList....


2

We need to add $ and wrap that variable in (') single quotes, { 'mode': mode } should be { 'mode': '$mode' } import { LightningElement, api, wire } from 'lwc'; import { getRecord } from 'lightning/uiRecordApi'; export default class Record extends LightningElement { @api recordId; @wire(getRecord, { recordId: '$recordId' }) record; }


Top 50 recent answers are included