Dynamically populate the options of a 'Select' component


I am trying to dynamically populate the options that are shown for a ‘Select’ component.

Can anyone provide some guidance on how to do this? I have already retrieved from the database the options and stored it in a state variable in UI Bakery. However, when I do the below using the variable, I get nothing. Thanks.

Hi @ObyY!
Looks like you need to set a proper data format for select component.
As a quick solution, please check this article

Thanks Artem. The solution worked, but with a little tweak. I had to map {{data}} and not {{result.data}} i.e.

{{data}}.map(item => ({ label: item.name, value: item.name }))