reactdatagrid.io checkboxColumn Cannot read properties of undefined (reading 'showInContextMenu')

299 Views Asked by At

After adding the checkboxColumn property to my ReactDataGrid, empty extra columns are added to my table when the column order is changed. On clicking the context menu icon in any of the column headers the following exception occurs: "Cannot read properties of undefined (reading 'showInContextMenu')"

1

There are 1 best solutions below

0
On

Make sure that you have a "name" attribute in each of your column definitions. This is what caused this error for me. The data grid uses this to index the columns, so it needs it to create the context menu.