Implementing a Delete Feature
Select and Delete Products Stored in Firestore from a Table
Displaying Product List Information in a Table
- Click [Create] 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].
- Place a [Table] and enter
{{ listProducts.data }}
in the editor's [Data].
Placing Components for Deleting Data
- Place a [Column].
- On the left side of the [Column], place the previously positioned [Table], and on the left side, place a [Modal] and a [Text].
- Select the [Modal] and place a [Button] and a [Text] inside it.
- Select the [text1] on the right side of the column and enter
Delete Product Data
in the editor's [Text]. - Select the [modal1] on the right side of the column and enter
Delete {{ table1.selectedRow.data.title }}
in the editor's [Button label]. - Select the [text2] inside the modal and enter
Are you sure you want to delete {{ table1.selectedRow.data.title }}?
in the editor's [Text]. - Select the [button1] inside the modal and enter
Execute Deletion
in the editor's [Label]. - Adjust the width of the [Column].
Creating a Dataflow to Delete Product Data and Linking it to the Button in the Modal
- Click [Create] in [Dataflows] and change the dataflow name to
deleteProduct
. - Select
Onboarding Firebase
as the data source. - Choose
Delete document
in [Action] and enterproducts
in [Collection]. - Enter
{{ table1.selectedRow.data.meta.id }}
in [Document ID]. - Click [Success events] and select
listProducts
. - Select the [button1] inside the modal and click [Add].
- In the added event, select
deleteProduct
in [Dataflow].