title: ag-grid hidden columns visible after row grouping changed
body: <p>I have the following issue with setting row groups and hidden columns.</p>
  
  <p>Initially when I fetch the column definitions I set the row groups like below</p>
  
  <pre><code>this.gridOptions.api.setColumnDefs(columnsAndData[0]);
  this.gridOptions.columnApi.setRowGroupColumns(this.selectedGroupBy);     / selectedGroupBy is string[]
  this.gridOptions.api.setRowData(columnsAndData[1]);
  </code></pre>
  
  <p>This works fine and any hidden columns in columnDefs are not showing on the grid.</p>
  
  <p>Subsequently when I change the row grouping via below method the hidden columns become visible.</p>
  
  <pre><code>changeGroupBy(): void {
  this.gridOptions.columnApi.setRowGroupColumns(this.selectedGroupBy);
  this.gridOptions.api.refreshGroupRows(); }
  </code></pre>
  
  <p>Can you explain this behaviour and why hidden columns are reset to visible again?</p>