How/ where to use setInterval please.
feat: setInterval and clearInterval support by hetunandu · Pull Request #8158 · appsmithorg/appsmith · GitHub but after trying it in a few places (yes I have data setup - but it’s Firestore not MySQL) it doesn’t seem to validate. I just get “setInterval is not a function”.
I can get the data into a table, no problem. I just can’t add setInterval and live/ reatime data is the whole reason I am using AppSmith, I didn’t even consider that it wouldn’t be a feature that data from (specifically) Firebase isn’t updated.
Surely a ‘webapp’ is the kind of thing to have live data/ workers/ web socket as standard, in comparison to a normal static webpage?
Also reference in:
Having a query table automatically update and reflect new values in the database - #3 by bebca1
FYI I’m on AppSmith Cloud
@bebca1, sorry for the delayed response, you can use
setInterval function to automatically update data on widgets from queries.
Here is the documentation for this:
Please find a more detailed example here:
Say you want to update data on Table without re-running the API / or using a refresh button, you can use the setInterval function.
In this example, we’ll be using the switch widget (Switch1) to control this function and a table widget that uses the getData query.
Now on Switch1 widget’s onChange property, we use the…