Compare commits

...

2 Commits

Author SHA1 Message Date
jansenk
286e194414 change test expectations 2019-01-03 16:55:13 -05:00
jansenk
3deb592d89 remove sorting on columns 2019-01-03 16:48:30 -05:00
3 changed files with 0 additions and 19 deletions

View File

@@ -344,9 +344,6 @@ export default class Gradebook extends React.Component {
<Table
columns={this.props.headings}
data={this.formatter[this.props.format](this.props.grades, this.props.areGradesFrozen)}
tableSortable
defaultSortDirection="asc"
defaultSortedColumn="username"
/>
</div>
{PageButtons(this.props)}

View File

@@ -96,16 +96,12 @@ describe('actions', () => {
track: expectedTrack,
headings: [
{
columnSortable: true,
key: 'username',
label: 'Username',
onSort: expect.anything(),
},
{
columnSortable: true,
key: 'total',
label: 'Total',
onSort: expect.anything(),
},
],
prev: responseData.previous,

View File

@@ -66,8 +66,6 @@ const headingMapper = (filterKey) => {
const results = [{
label: 'Username',
key: 'username',
columnSortable: true,
onSort: (direction) => { dispatch(sortGrades('username', direction)); },
}];
const assignmentHeadings = entry.section_breakdown
@@ -75,15 +73,11 @@ const headingMapper = (filterKey) => {
.map(s => ({
label: s.label,
key: s.label,
columnSortable: true,
onSort: direction => dispatch(sortGrades(s.label, direction)),
}));
const totals = [{
label: 'Total',
key: 'total',
columnSortable: true,
onSort: direction => dispatch(sortGrades('total', direction)),
}];
return results.concat(assignmentHeadings).concat(totals);
@@ -95,8 +89,6 @@ const headingMapper = (filterKey) => {
const results = [{
label: 'Username',
key: 'username',
columnSortable: true,
onSort: (direction) => { dispatch(sortGrades('username', direction)); },
}];
const assignmentHeadings = entry.section_breakdown
@@ -104,15 +96,11 @@ const headingMapper = (filterKey) => {
.map(s => ({
label: s.label,
key: s.label,
columnSortable: false,
onSort: (direction) => { this.sortNumerically(s.label, direction); },
}));
const totals = [{
label: 'Total',
key: 'total',
columnSortable: true,
onSort: direction => dispatch(sortGrades('total', direction)),
}];
return results.concat(assignmentHeadings).concat(totals);