Ag-grid isRowSelectable conditional not activating

Viewed 700

We have an Ag-Grid table with row selection via the built in checkbox functionality. The check boxes are conditionally displaying via the isRowSelectable options:

 isRowSelectable: function (rowNode) {
        return rowNode.data ? rowNode.data.published === false : true;
      }

The published column is being updated as part of a modal called from another column. A redrawRows is being called when the modal is closed:

modal.result.then(() => {
            const row = params.api.getDisplayedRowAtIndex(params.rowIndex as number);
            //this.gridApi?.redrawRows([row] as any);
            this.gridApi?.redrawRows();
          });

The display values in the row are being updated when the modal is closed, however, the checkbox is not appearing when the published value is set to false. If I hang a breakpoint in Dev Tools the isRowSelectable code does not appear to be hit.

Any suggestions would be much appreciated.

Cheers,

-John

2 Answers
Related