Search In This Blog

2021-02-15

Salesforce lwc: ApexFresh re-get wired data

@api recordId; 

recordList;


@wire(getDataMethod, {recordId : '$recordId'}

async recordList(value) {

    this.recordList = value;

    const {data, error} = value;

    if (data) {}

    else if (error) {}

}


handleClick(event) {

    refreshApex(this.recordList);

}

No comments:

Post a Comment