I am building a custom element which is basically a group of HTML
<select>s. The options should be fetched from the backend via Promises and always come from the exact same source, while the selected values are directly bound to an object’s properties.
However, it seems components lack potentially asynchronous hooks during their building licefycle, unlike the
activate hook of routable pages. I tried putting the backend calls in
bind, but while the data does get loaded the association with the original selected values gets lost.
created also does not seem to be asynchronous, at least according to the TypeScript type definitions.
I could load the options in the containing pages and bind them to the component, but since in this case the data sources are always going to be the same it would be somewhat cumbersome.
Right now, is there any way to force a component to wait for the loading promises to be fulfilled?