I have a Lightning Datatable with row actions. Clicking on one the row actions need to make an external callout and get values for another function which dispatches an event with those retrieved values. Like this:
case GenerateReport:
this.selectedRow = event.detail.row;
this.getDataFromAPI(); //Uses apexContinuation for callouts
this.dispatchDataForReport();
break;
Both the JS functions work well, but not in sync. I've tried searching online for a similar use-case, but everywhere it's unique. How can implement a Promise(or async/await) approach to get the API data prior to calling the dispatch
function?