I am working on an Ag-grid project, where I have a toggle button to toggle between two groupBy's. Each group by has different Column definitions, which I am then updating using GridApi. When the updation of column definitions happens, the undo/redo stack is lost. Is there a way to retain those or any alternate solutions.
I tried looking for it in the doc, but I couldn't find anything related to it.