Unable to Refresh Repeater after database update

I have comment post section, where the comment posts are in a repeater. however when i preset the post button, the dataset is updated but the repeater is not refreshed to show the newest comment added. I will show when i refresh in the whole page. However in preview more the repeater will refresh.

export async function button5_click(event) {
 //Add your code for this event here: 
 let $item = $w.at(event.context);
 let toInsert = {
 "title":$w('#textBox1').value,
 "com_linked_question":$w('#dynamicDataset').getCurrentItem()._id,
 "com_author":wixUsers.currentUser.id
    }

    wixData.insert('CommentPosts', toInsert);

    $item("#dataset1").refresh();
    $w("#dataset1").onReady( () => {
        $w('#dataset1').refresh();
        $item("#dataset1").refresh();
        } );
    $w('#textBox1').value = "";
    $w('#button5').hide();
    $w('#textBox1').hide(); 
    $w('#button6').show();
}

If you are trying to use async in your code, then you need to make sure that you are using the await too.

To see more about using asynchronous code and working with promises, see this page here.
https://support.wix.com/en/article/corvid-working-with-promises

Also, you can refer back to these previous forum posts as well.
https://www.wix.com/corvid/forum/community-discussion/save-and-refresh-repeater
https://www.wix.com/corvid/forum/community-discussion/how-to-refresh-a-repeater-s-items-without-reloading-a-page

This is not in a repeater however this old video example from Wix might help you here too.
Corvid by Wix | How to Collect & Display User-Generated Content on Your Website

my repeater is connected to dataset1. I don’t see a refresh function for a repeater.

Thank adding the await fixed it, although it is a bit slow, as it takes 2-3 seconds. but i am happy.

@fahad Can you post your code with the AWAIT function. I am having trouble with refreshing the repeater and believe I need an await function but do not know how to set it up.