Implementing Page Navigation
Display a list of product data stored in Firestore and implement navigation to each product's detail page
Create a new app and set up a page to display product data
- Place a [Table] on the canvas.
- Click [Create New] in [Dataflows] and change the dataflow name to
listProducts
. - Select
Onboarding Firebase
as the data source. - Choose
List documents
in [Action] and enterproducts
in [Collection]. - Click [Run], and with the table selected, enter
{{ listProducts.data }}
in [Data] of the [Inspect]. - Place a [Text] and enter
Product List
in the [Text] of the [Inspect].
Create a page to display product details and retrieve detailed information from a dataflow
- Click the menu at the top left of the editor, click [Create], and from the dropdown menu, click [Create Page].
- Enter
Product Details Page
in [Page name] and click [Create]. - Click [Add Event] in the [Inspect] of the [Table], and select the
Product Details Page
created earlier in [Page]. - Click [Add Parameter], enter
documentId
for [Key], and{{ table1.selectedRow.data.meta.id }}
for [Value]. - Click on any product data within the [Table] and navigate to the [Product Details Page].
- Click [Create] in [Dataflows] and change the dataflow name to
getProduct
. - Select
Onboarding Firebase
as the data source. - Choose [Get document] in [Action] and enter
products
in [Collection]. - Enter
{{ querierUrlParams.value.documentId }}
in [Document ID]. - Click [Run] and from [State] select the [getProduct] dataflow.
- Click the page name at the top left of the header, click the [Eye Icon] next to [Product Details Page], and set it to hidden from navigation.