Skip to main content
Fixing code formatting
Source Link
Derek F
  • 64.2k
  • 15
  • 55
  • 104

use an imperative method instead of wire method in renderCallback, call the renderCallBack after the updation.

handleSave() { try { updateForecasts({forecasts : this.data}).then(() => {

                this.renderCallback();
        })
        
        this.draftValues = [];
    }
    catch(e) {
        console.log('e = ' + e)
    }
}
handleSave() {
    try {
        updateForecasts({forecasts : this.data}).then(() => {
            this.renderCallback();
        })
            
        this.draftValues = [];
    }
    catch(e) {
        console.log('e = ' + e)
    }
}

please use boolean inside the renderCallback to avoid multiple apex call.

use an imperative method instead of wire method in renderCallback, call the renderCallBack after the updation.

handleSave() { try { updateForecasts({forecasts : this.data}).then(() => {

                this.renderCallback();
        })
        
        this.draftValues = [];
    }
    catch(e) {
        console.log('e = ' + e)
    }
}

please use boolean inside the renderCallback to avoid multiple apex call.

use an imperative method instead of wire method in renderCallback, call the renderCallBack after the updation.

handleSave() {
    try {
        updateForecasts({forecasts : this.data}).then(() => {
            this.renderCallback();
        })
            
        this.draftValues = [];
    }
    catch(e) {
        console.log('e = ' + e)
    }
}

please use boolean inside the renderCallback to avoid multiple apex call.

Source Link

use an imperative method instead of wire method in renderCallback, call the renderCallBack after the updation.

handleSave() { try { updateForecasts({forecasts : this.data}).then(() => {

                this.renderCallback();
        })
        
        this.draftValues = [];
    }
    catch(e) {
        console.log('e = ' + e)
    }
}

please use boolean inside the renderCallback to avoid multiple apex call.