Building a Select's Options from Retrieved Data
Retrieving a List of Product Categories Through a Dataflow and Displaying Them as Options in a Select
Retrieve Values from a Dataflow
- Click [Create] in [Dataflows] and change the dataflow name to
listCategories. - Select
Onboarding Firebaseas the data source. - Choose [List documents] in [Action] and enter
categoriesin [Collection]. - Click [Run].
Dynamically Display Values from Dataflow in Select
- Place a [Select].
- Open the editor for the [Select] and enter
{{ listCategories.data.map(d => d.id) }}in [Values]. - Enter
{{ listCategories.data.map(d => d.name) }}in [Labels]. - Enter
Select a Categoryin [Label]. - Verify that it operates correctly in the preview screen.