Hi! I made this comment section with some text boxes and a button to submit the comment and I put the same data on two differents datasets: Write dataset (#dataset1) and Read dataset (#dataset2). That way, whenever I write a comment, I can see it posted on my repeater below my formulary. Well, at least sort of. I need to refresh my page in order to see the most recent comment, but I’m trying to make my repeater refresh immediatly after I click on the submit button.
I’ve already tried to use both codes avaible on wix references https://www.wix.com/corvid/reference/wix-dataset/dataset/refresh
and I also have tried this
export async function submit_click(event) {
let $item = $w.at(event.context);
let newValue = $item('#comment').value;
$item('#dataset2').setFieldValue('gosc', newValue);
await $item('#dataset2').save();
await $w("#dataset2").refresh();
}
and this code that I’ve found in some answers
export function submit_click(event) {
let $item = $w.at(event.context);
$item("#dataset2").refresh()
}
but none of them is working for me. Maybe is just one little thing that’s not working and I’m not seeing since I’m very new into coding, but I would be very thankful if someone point that out!