How do I refresh my repeater content on the page after a new record is submitted? I used the following code but the repeater is not refreshing with the new item. What am I doing wrong?
Hello @_eric , are you connecting your repeater manually (through elements) or by code? Because if it is manually connected, it should refresh the repeater as soon as the dataset is refreshed.
Otherwise, you should assign a new data to the repeater using the data property, like so:
The repeater is currently connected through a dataset that lives on the page. I have a form, that is also connected to the dataset.
I would like for the added record to automatically populate to the repeater upon submission.
How would you suggest I get that result? Currently, I have to refresh the browser page for the data to populate into the repeater, which is not what I want.
@_eric I would guess that you are trying to refresh the dataset before it is really updated, because you are not using code. That’s why it is not working. I tried using a Hook to capture the dataset change but could not do it, I guess inserting items through a form uses suppressHooks that cannot be changed.
So the solution I found was putting a 2 seconds delay on the .refresh() method call, like this: