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 <Table
columns={this.props.headings} columns={this.props.headings}
data={this.formatter[this.props.format](this.props.grades, this.props.areGradesFrozen)} data={this.formatter[this.props.format](this.props.grades, this.props.areGradesFrozen)}
tableSortable
defaultSortDirection="asc"
defaultSortedColumn="username"
/> />
</div> </div>
{PageButtons(this.props)} {PageButtons(this.props)}

View File

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

View File

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