gregnb / gregnb/mui-datatables

customTableBodyFooterRender should include columnOrder

Open Beginner friendly
#1,811 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

The optional callback `customTableBodyFooterRender` includes `columns`, but not `columnOrder`. This is essential information if column reordering is allowed.

https://github.com/gregnb/mui-datatables/blob/master/src/MUIDataTable.js#L2050

Should be a very easy fix:
```
{this.options.customTableBodyFooterRender
? this.options.customTableBodyFooterRender({
data: displayData,
count: rowCount,
columns,
columnOrder, // <- add this line
selectedRows,
selectableRows: this.options.selectableRows,
})
: null}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/MUIDataTable.js around line 2050, where customTableBodyFooterRender is invoked, and inspect the callback payload alongside the existing columns value. Done means the callback receives columnOrder when column reordering is enabled, with the surrounding behavior unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.