Hi everyone, I’m trying the fix that @matthieu_chateau suggested, but so far I haven’t been able to make it work.
This is the code which I have placed inside tag:
I’m trying to refresh a list detail block with the name as in the code, I’m trying to console.log some text when this triggers, but for some reason this event listener never gets triggered.
The code above from @matthieu_chateau works (thank you), but when the script kicks in and refreshes the block, it shows a weird load “artifact” on the softr page for just a second or two. Is there any way to control it or get rid of it?
Can you tell me which code you use and what do you see exactly? An artifact in the middle of the page or an artifact on the block where you listen for an update? What block is it?
Question: Is it also possible to trigger a refresh of a list block IN RESPONSE TO AN UPDATE OF A LIST DETAILS BLOCK WHICH HAS BEEN OPENED IN A MODAL?
Addition: the provided code works very nice, with the minor addition that in case you have a button to remove an item from a list block, the suggested code line works only (at least for me) if the word “update” is replaced by “delete” in the cited code (so that would become: window.addEventListener(‘DELETE-record-success.list1’,… etc.)
Is there any update on this feature. I am working on an application, I want to add a waiting message to the block till I can get data from make app after submission of a form. I want to add waiting time to load till I fetch result. Currently, data is taking around 30 seconds to load. But, users could not see that data. It is visible only after refreshing the page. Please help on this.
Hello Community.
A slight modification to the use case - what would the code look like if I had an Action Button in a List block that called the newly available “API Call” action after which the block would need to reload/refresh its data? Obviously, some delay would need to be necessary because the API Call would call a webhook and a workflow that may take a second or two to process.
Putting this code in the header works. I can see the page reload. However, on the page in my List Block I have an Action Button whose display is conditional and is based on specific values in Airtable that get updated by the Action itself.
The weirdest thing - the page reloads but the Action Button’s conditional appearance isn’t respecting the new Airtable values that are being updated by the Action API call.
I thought it was a delay issue with processing the API call, which triggers a webhook that does the actual Airtable update job. But no, even if I delay it significantly, it refreshes the page, but the conditional logic does not respect the updated values in Airtable. Only if I refresh the page manually is when those values are respected by the conditional display logic.
It’s the “On Which Records” condition that ultimately does the magic of revealing or hiding the button, because the API call invoked by the button updates Airtable data that ultimately causes this condition to resolve to true or false…
The gist of it is:
I have the custom code setup to reload the page in 5 secs. It can be clearly seen how the page gets reloaded but the button does not get updated with the reload. Only manually reloading the page updates the button.
@artur Actually, I am experiencing a similar issue.
The main Softr page on opening checks whether Term & Conditions are accepted and if not - opens a Modal window asking to accept them
“User” record in Airtable is updated in popping-up modal window, marking that T&C are accepted
After the Users record is successfully updated the code waits 2 sec and then throws window.parent.location.reload() to return to the main page
The main Softr page has 2 blocks - one is connected to Users table and the second one - connected to another table, but filtered on current User’s record data
Result - the first component, which is connected to Users table - is updated immediately. The second one, which is connected to another table but being filtered based on current User’s record, which has been changed - is updated about 1 min later only (!!!) - 15 sec delays, code reloads, browser reloads - nothing helps, the data remains inconsistent for about a minute
What could be a solution, how could I force an update of data in current User’s record? - as in my understanding the problem is exactly there
I’ve been already working with Aramayis on this for the last couple of weeks. He came back yesterday asking for more (indefinite) time to resolve this. I’ve asked whether the development understand the cause of the issue and have a solution and just need time to implement it or if they need time to figure our the cause of the issue. He said it’s the latter. So, as far as I can tell, Softr has not determined what’s wrong. Hence the indefinite time-table for resolution. Aramayis may have more relevant information. Thank you!