Right now, we don’t have an official way of doing loadData(...).then(...), but we have a react hook called useEmbeddableState which you can use to “hack it” if you really need touseEmbeddableState basically allows you to pass state back and forth between your .emb.ts file and the react component (example here). Because of that, you can set up a flow like this:
- first
loadDataruns in your.emb.tsfile - results are passed to react component
- you can use
useEmbeddableStateto pass appropriate state back to the.emb.tsfile .emb.tsfile reacts to the change of state, and calls the secondloadDatacall