diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..36dd3e24 Binary files /dev/null and b/.DS_Store differ diff --git a/js/.DS_Store b/js/.DS_Store new file mode 100644 index 00000000..8f654243 Binary files /dev/null and b/js/.DS_Store differ diff --git a/js/components/.DS_Store b/js/components/.DS_Store new file mode 100644 index 00000000..a817a720 Binary files /dev/null and b/js/components/.DS_Store differ diff --git a/js/components/ascribe_table/.DS_Store b/js/components/ascribe_table/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/js/components/ascribe_table/.DS_Store differ diff --git a/js/components/ascribe_table/table_header.js b/js/components/ascribe_table/table_header.js index 564f7725..a4e68879 100644 --- a/js/components/ascribe_table/table_header.js +++ b/js/components/ascribe_table/table_header.js @@ -12,9 +12,9 @@ let TableHeader = React.createClass({ propTypes: { columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnContentModel)), itemList: React.PropTypes.array.isRequired, - changeOrder: React.PropTypes.func.isRequired, - orderAsc: React.PropTypes.bool.isRequired, - orderBy: React.PropTypes.string.isRequired + changeOrder: React.PropTypes.func, + orderAsc: React.PropTypes.bool, + orderBy: React.PropTypes.string }, render() { diff --git a/js/components/ascribe_table/table_header_item.js b/js/components/ascribe_table/table_header_item.js index fef82f34..dce2261e 100644 --- a/js/components/ascribe_table/table_header_item.js +++ b/js/components/ascribe_table/table_header_item.js @@ -8,10 +8,10 @@ let TableHeaderItem = React.createClass({ columnClasses: React.PropTypes.string.isRequired, displayName: React.PropTypes.string.isRequired, columnName: React.PropTypes.string.isRequired, - canBeOrdered: React.PropTypes.bool.isRequired, - changeOrder: React.PropTypes.func.isRequired, - orderAsc: React.PropTypes.bool.isRequired, - orderBy: React.PropTypes.string.isRequired + canBeOrdered: React.PropTypes.bool, + changeOrder: React.PropTypes.func, + orderAsc: React.PropTypes.bool, + orderBy: React.PropTypes.string }, changeOrder() { @@ -19,7 +19,7 @@ let TableHeaderItem = React.createClass({ }, render() { - if(this.props.canBeOrdered) { + if(this.props.canBeOrdered && this.props.changeOrder && this.props.orderAsc != null && this.props.orderBy) { if(this.props.columnName === this.props.orderBy) { return (