Skip to content

Commit 5abaf0f

Browse files
committed
Minor changes to Firebase On Data Change
1 parent 78c0c67 commit 5abaf0f

File tree

2 files changed

+32
-18
lines changed

2 files changed

+32
-18
lines changed

docs/ff-integrations/database/cloud-firestore/firestore-actions.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -261,26 +261,37 @@ com/embed/238400b5445b444db712f492584b0d6e?sid=7b496882-0280-4920-924c-640fddeff
261261

262262
To do so:
263263

264-
1. Ensure you have **Query Collection** or **Document from Reference** added on a widget with **Single Time Query** disabled.
265-
2. Now select the widget, head over to **Actions**, and click **+ Add Action**.
266-
3. Select the **On Data Change** tab. That means actions added under this will be called whenever the data changes.
267-
4. Now, you can
268-
[add any Action](../../../resources/control-flow/functions/action-flow-editor.md#adding-an-action-example)
269-
here.
264+
1. Ensure you have added a **Query Collection** or **Document from Reference** on a widget with **Single Time Query** disabled.
265+
2. Now, on the widget with **Query Collection** or **Document from Reference**, open the **Action Flow Editor** and set **On Data Change** as the [Action Trigger](../../../resources/control-flow/functions/action-triggers.md). This ensures that any actions you add will be triggered whenever the data is updated, added, or deleted.
266+
3. You can now [add any action](../../../resources/control-flow/functions/action-flow-editor.md#adding-an-action-example) you want to perform, such as showing a notification, refreshing the UI, or fetching related data.
270267

271268
:::info
272-
* Actions will be triggered whenever the data is added, updated, or deleted.
273-
* If you are adding this on ListView, ensure you disable the infinite scroll.
269+
If you are using this trigger on a ListView, make sure to **disable** the **Infinite Scroll**.
274270
:::
275271

276-
Here is an example showing the
277-
[**Snackbar**](../../../resources/ui/pages/page-elements.md#show-snackbar-action)
278-
message when the data
279-
changes in a collection.
280-
281-
<figure>
282-
![img_27.png](img_27.png)
283-
<figcaption class="centered-caption">Trigger snackbar action on data change</figcaption>
284-
</figure>
285-
272+
<div style={{
273+
position: 'relative',
274+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
275+
height: 0,
276+
width: '100%'}}>
277+
<iframe
278+
src="https://demo.arcade.software/ghFiQWGsQuJu5reUyXnl?embed&show_copy_link=true"
279+
title=""
280+
style={{
281+
position: 'absolute',
282+
top: 0,
283+
left: 0,
284+
width: '100%',
285+
height: '100%',
286+
colorScheme: 'light'
287+
}}
288+
frameborder="0"
289+
loading="lazy"
290+
webkitAllowFullScreen
291+
mozAllowFullScreen
292+
allowFullScreen
293+
allow="clipboard-write">
294+
</iframe>
295+
</div>
296+
<p></p>
286297

docs/ff-integrations/database/supabase/database-actions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ To respond to data changes in a Supabase table:
214214
2. On the widget with the **Supabase Query**, open the **Action Flow Editor** and set **On Data Change** as the [Action Trigger](../../../resources/control-flow/functions/action-triggers.md). This ensures that any actions you add will be triggered whenever the data is updated, added, or deleted.
215215
3. You can now [add any action](../../../resources/control-flow/functions/action-flow-editor.md#adding-an-action-example) you want to perform, such as showing a notification, refreshing the UI, or fetching related data.
216216

217+
:::info
218+
If you are using this trigger on a ListView, make sure to **disable** the **Infinite Scroll**.
219+
:::
217220

218221
<div style={{
219222
position: 'relative',

0 commit comments

Comments
 (0)