mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

customRowRender should give selected columns as argument

Open TimTimT opened this issue 3 years ago • 0 comments

Expected Behavior

When using customRowRender, it should be possible to ascertain which columns are currently displayed in the table. Currently, the information given to customRowRender contains data for all the columns in the table, regardless of whether all are displayed. I think it would make sense if 1. the "data" argument only contains data for the currently selected columns (other columns are still accessible through dataIndex) or 2. an additional argument is given that yields the currently selected columns. If there is a workaround for this, I would happy to hear about it.

My use case is developing draggable rows.

For reference: Override default row rendering with custom function. customRowRender(data, dataIndex, rowIndex) => React Component

TimTimT avatar May 13 '22 13:05 TimTimT