Skip to content

Commit

Permalink
test update
Browse files Browse the repository at this point in the history
  • Loading branch information
patorjk committed Aug 23, 2020
1 parent be54f57 commit a191a3c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/MUIDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1228,16 +1228,16 @@ class MUIDataTable extends React.Component {
getGroupingData(displayData, grouping) {
if (!grouping) return null;

console.log('getGroupingData');
console.log(grouping);
//console.log('getGroupingData');
//console.log(grouping);

let cols = grouping.columnIndexes;

if (!cols || cols.length === 0) return null;

console.dir(displayData);
//console.dir(displayData);
let groups = this.getGroups(grouping, cols, displayData, 1, []);
console.dir(groups);
//console.dir(groups);
return groups;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/TableBodyRows.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class TableBodyRows extends React.Component {
colIndex={0}
rowIndex={0}>
<Typography variant="body1" className={classes.emptyTitle} component={'div'}>
{options.textLabels.body.noMatch}
{options.textLabels ? options.textLabels.body.noMatch : ""}
</Typography>
</TableBodyCell>
</TableBodyRow>
Expand Down
7 changes: 4 additions & 3 deletions test/MUIDataTableBody.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { mount, shallow } from 'enzyme';
import { assert, expect, should } from 'chai';
import getTextLabels from '../src/textLabels';
import TableBody from '../src/components/TableBody';
import TableBodyRows from '../src/components/TableBodyRows';
import TableSelectCell from '../src/components/TableSelectCell';
import Checkbox from '@material-ui/core/Checkbox';

Expand Down Expand Up @@ -123,7 +124,7 @@ describe('<TableBody />', function() {
const toggleExpandRow = () => {};

const shallowWrapper = shallow(
<TableBody
<TableBodyRows
data={displayData}
count={displayData.length}
columns={columns}
Expand Down Expand Up @@ -151,7 +152,7 @@ describe('<TableBody />', function() {
const toggleExpandRow = () => {};

const shallowWrapper = shallow(
<TableBody
<TableBodyRows
data={displayData}
count={displayData.length}
columns={columns}
Expand Down Expand Up @@ -179,7 +180,7 @@ describe('<TableBody />', function() {
const toggleExpandRow = () => {};

const shallowWrapper = shallow(
<TableBody
<TableBodyRows
data={displayData}
count={displayData.length}
columns={columns}
Expand Down

0 comments on commit a191a3c

Please sign in to comment.