Visible property of a GridColumn

Setting the “visible” property on a GridColumn to false correctly hides the column, but setting it back to true doesn’t seem to make the column visible. In the following snippet clicking anywhere on the grid’s header should toggle the visibility state of the first column, but it only works one way. Calling the grid’s runPostponedComputations() method doesn’t help either.

let nRowCount = 1000;
let nColCount = 100;
let grid = grok.shell.addTableView(grok.data.demo.randomWalk(nRowCount, nColCount)).grid;

rxjs.fromEvent( grid.overlay, 'click').subscribe((e) => {

    let nButton = e.button;
    if (nButton === 0)
    {
        let cell = grid.hitTest(e.offsetX, e.offsetY);
        if (cell.isColHeader) {
            let colFirst =  grid.columns.byIndex(1);
            colFirst.visible = !colFirst.visible;
           }
   }
});

Thanks for reporting! We’ve fixed the issue, the fix will be deployed on the dev server in 30 minutes.

By the way, we really appreciate your code snippets that reproduce the issues, it helps a lot, thanks! May I suggest a slight improvement?

let grid = grok.shell.addTableView(grok.data.demo.randomWalk(100, 100)).grid;
ui.dialog()
  .add(ui.button('Toggle', () => grid.columns.byIndex(1).visible = !grid.columns.byIndex(1).visible))
  .show();