I am doing the tutorial “Listing data” and I’ve done exactly as the tutor said, but my list does not update instantly. I have to refresh the page to see new data records. Here are some screens before and after refreshing the page. Do anyone have a idea what is the problem?
Generally, the page needs to be refreshed. But what does update instantly, is if it handles a database taken from a REST API. When you are setting up the interface and you just put data in, you have to update if you are in the web preview, or if you are in the mobile preview you just save the change and it updates itself. If your application goes to production and you have external data such as a REST API, if the changes are reflected instantly without having to exit or restart the application (whether they are images, text, titles, data, etc.).
Hi, apologize me if I ask something that maybe you already explained, but I’m not a native speaker and I didn’t understood well your previous reply.
Me too, I’ve created a basic list. It uses a data resource saved locally on the device. I’m testing it with the mobile preview app on my phone.
I’ve set the logic to delete the item from the list when the user taps on that specific item. What happens is that after deletion the list isn’t updated and continues to show the tapped item.
In order to see the deletion, I have to close the app completely.
Is it normal?
I have the same problem when I add a new item to the list (my page has on top the inputbox with the create button and on the bottom the list of created items).
How can I force a refresh of the basic list or of the page?
Thanks for your help
Okay I answer myself, because I found a partial solution to this problem, and it’s to use a Replace page node (it needs to be installed from the marketplace) after the delete or save node to reload the page. In the reloaded page I see the updated list, though this seems to me a solution not clean, to say the least.
Any other idea?
The basic list component has a “Refresh data?” property that needs to be set to True for it to update whenever data is changed. Otherwise, the component only fetches data when it is first loaded in.
I’ve done this but still it does not work, but I managed to install different list (from marketplace) that is working