I have a SPA app. On one page I update data and then onsuccess refresh/reload the serverconnect query. On another page this serverconnect query has a data view to make sorting and filtering easier/quicker on the page.
I can see the query refreshing in dev tools but the data view stays unchanged. Can one force refresh the data view?
I removed dataview for now, to test if I can just get the page to show update, but despite updating the query, the page with or without dataview is not updated if the page is not currently displaying.
I will have to try and find a workaround by adding query refresh to the nav button to navigate to it.
Only problem is when user pressed back it will not refresh.
To be clear - query shows updated in dev tools, but the view isn’t updated
Trying to “Fool” app connect by adding a server action that inserts a field in db and the onsuccess refresh the qeury but also not working. I guess server connect is clever enough to check if any changes in a query before refreshing it and this work around is not fooling it
Also tried setting localstorage to 1 second and see if the query will refresh after running itself on success in fact creating a loop that just keeps on refreshing in the background.
I guess this is the worst I can do for my server if we are going to have hundreds of people at the same time and this one query - around 1kb is going to keep on refreshing till they leave the web site…
This obviously works, but the payoff is maybe a server crashing
What is that query? How do you refresh a query? Aren't you running server connect which lists the data, on success update? Is it possible for you to explain where do you have what on your pages, as the terms you are using are not making it clear.
In today’s update we are going to introduce Show and Hide dynamic and static events for the page routes. They can be used to load server actions or custom js script, when a route is shown or hidden, so you will be able to reload your server action on every route load.