diff --git a/js/components/table.js b/js/components/table.js index b2195a39..7565868c 100644 --- a/js/components/table.js +++ b/js/components/table.js @@ -10,10 +10,9 @@ let Table = React.createClass({ }, render() { if(this.props.itemList && this.props.itemList.length > 0) { - return (
- + {this.props.itemList.map((item, i) => { return ( diff --git a/js/components/table_header.js b/js/components/table_header.js index 78e41e2d..8754e477 100644 --- a/js/components/table_header.js +++ b/js/components/table_header.js @@ -10,7 +10,8 @@ let TableHeader = React.createClass({ columnMap: React.PropTypes.object.isRequired, itemList: React.PropTypes.array.isRequired, fetchList: React.PropTypes.func.isRequired, - orderAsc: React.PropTypes.bool.isRequired + orderAsc: React.PropTypes.bool.isRequired, + orderBy: React.PropTypes.string.isRequired }, sortIndex(i) { @@ -31,9 +32,8 @@ let TableHeader = React.createClass({ let columnMapValuesList = GeneralUtils.valuesOfObject(this.props.columnMap); let calcHeaderText = (val, i, columnClass) => { - let s = ""; - if(columnMapValuesList[i].canBeOrdered) { + if(columnMapValuesList[i].canBeOrdered && Object.keys(this.props.columnMap)[i] === this.props.orderBy) { let boundClick = this.sortIndex.bind(this, i); let carretDirection = 'glyphicon-triangle-'; diff --git a/js/components/table_header_item.js b/js/components/table_header_item.js new file mode 100644 index 00000000..d566975c --- /dev/null +++ b/js/components/table_header_item.js @@ -0,0 +1,9 @@ +import React from 'react'; + + +let TableHeaderItem = React.createClass({ + mixins: [TableColumnMixin], + render() { + return() + } +});