Problem to populate a selectBox with Axios in Properties Panel

Hi, I call with axios an api in order to populate a selectBox but I cannot see the options in the first load.
Data options is only visible if user does something on the modeler (such as a click on a task). In other words, it is needed to trigger a user event to visualize the data in the SelectBox. I figure out that this behaviour is due to the asynchronous call with axios.
See the example:

I could fix this problem with a synchronous call using ajax instead of axios. But this could cause performance problems.

Any suggestions? Thank you!

Your question seems to be about older versions of bpmn-js-properties-panel. Unfortunately, async data loading is not supported by these versions.

We encourage you to consider using the latest version of bpmn-js-properties-panel. It makes asynchronous data handling a lot easier! Check out this example: bpmn-js-properties-panel Async Data Example.

In case you’re giving it a try, we’d love to hear your feedback! :heart:

1 Like