Skip to content
This repository was archived by the owner on Jul 17, 2020. It is now read-only.

Commit 5d96d79

Browse files
authored
Merge pull request #36 from 0soft/label_total
Add Label total
2 parents 4f2f41b + 7a7363b commit 5d96d79

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/MUIDataTable.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class MUIDataTable extends React.Component {
405405
};
406406

407407
setTableData(props, status, callback = () => {}) {
408-
const { data, options } = props;
408+
const { data, options, totalLabel } = props;
409409

410410
let tableData = [];
411411
let totals = [];
@@ -414,12 +414,7 @@ class MUIDataTable extends React.Component {
414414
let sortDirection = null;
415415

416416
columns.forEach((column, colIndex) => {
417-
totals[colIndex] = window._ ? window._('Total:') : 'Total:';
418-
if (colIndex > 0) {
419-
totals[colIndex] = '';
420-
}
421-
422-
totals[colIndex] = window._ ? window._('Total:') : 'Total:';
417+
totals[colIndex] = totalLabel ? totalLabel : window._ ? window._('Total:') : 'Total:';
423418
if (colIndex > 0) {
424419
totals[colIndex] = '';
425420
}

0 commit comments

Comments
 (0)