working with the refreshApex feature in LWC
Going by the documentation, it seems you will need to create an additional property and utilize that in your wired function.
To refresh a wired method, pass the argument the wired method receives (which is the wired value) to
refreshApex()
. In this sample code, the wired method iswiredGetActivityHistory(value)
. Hold on to the value provisioned by the wire service and pass it torefreshApex()
.
You will need to declare another variable, say mySendForSplitting
and then utilize that in your sendForSplitting
, something as:
sendForSplitting({error,data}) {
this.mySendForSplitting = data;
// rest of the code
}
And then use refreshApex()
as below:
refreshApex(this.mySendForSplitting);
You can find an example on the lwc-recipe as well.