Search code examples
ajaxtabsgridadminmagento2

Magento2 admin customer edit form tab refresh content every click


I have a custom customer edit form tab, all working fine. This shows a grid of content from the database.

At the top of the grid, I have an ADD button, which allows me to add more content for the grid via a modal form and ajax. Once ive saved the content, via ajax...i have to refresh the customer edit page via javascript to be able to see the new content in the grid.

Is there a way to refresh the grid content for the tab without refreshing the page? Trigger the tab link again somehow?


Solution

  • I had to generate the grid block HTML, and return this via ajax and update the grid container.