Our blazing fast Grid component built with pure JavaScript


Post by anuradha.gopal »

We are modifying the following project to try Grouped Headers in the Grid control.
grid-5.1.1-trial\examples\frameworks\vue\javascript\export-excel\src


We are using state save to save column change settings like reordering of columns, width, hide and show

For columns it is rendering the state but any column changes for sub headers of the grouped header, the state is not rendered.

MicrosoftTeams-image (2).png
MicrosoftTeams-image (2).png (47.2 KiB) Viewed 241 times

Sharing the code:
We are adding this block to the existing code in listeners block:

listeners: {
   columnDrop: function ({ source }) {
      console.log("DragDrop triggeres", source.state)
      localStorage.setItem('docs-grid-state', JSON.stringify(grid.state));
    },

   paint: function () {
      const state = JSON.parse(localStorage.getItem('docs-grid-state'));
      if (state) grid.state = state;
   },
  }
  

The following is the listeners block for the Columns:

listeners: {
    columnDrop: function ({ source }) 
    {      
    	localStorage.setItem('docs-grid-state', JSON.stringify(grid.state));    
    },

    paint: function () {      
    	const state = JSON.parse(localStorage.getItem('docs-grid-state'));      
    	if (state) 
    		grid.state = state;
    },  
    }

Please advise.


Post by marcio »

Hello anuhadha.gopal,

Thanks for the report. That's a bug, I created a ticket for fix it https://github.com/bryntum/support/issues/5261

Best regards,
Márcio


Post Reply