revolist / revogrid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance 🔋
https://rv-grid.com
MIT License
2.77k stars 174 forks source link

How to hide columns? #214

Closed van-huyen closed 3 years ago

van-huyen commented 3 years ago

Hi @revolist ,

How to hide a column on revo grid? I tried set column size = -1 and style: display none, but "column header" will display when i switch to responsive mode.

    {
      prop: 'hide',
      name: 'Hide',
      size: -1,
      cellProperties: ({ prop, model, data, column }) => {
        return {
          style: {
            display: 'none',
          },
        }
      }
    },

hope you guide me Thanks

revolist commented 3 years ago

Hello @van-huyen the best way would be to keep 2 collections on your side, 1st for grid 2nd for all data, and update 1st collection with visible rows only.