I have modern a modern list showing unapproved records. On the page there is an Approve button that trigger the webapi to update a set records. After the update is successful, I need to refresh the list. This isn't working, and I can't find any documentation on how to do this.
document.addEventListener("DOMContentLoaded", () => {
const grid = document.querySelector("pages-grid[list-id='Default List Name']");
grid?.refresh();
});