diff --git a/js/components/ascribe_table/table.js b/js/components/ascribe_table/table.js index d95ea4c7..71c97658 100644 --- a/js/components/ascribe_table/table.js +++ b/js/components/ascribe_table/table.js @@ -1,17 +1,19 @@ import React from 'react'; -import TableItem from './table_item'; import TableHeader from './table_header'; - import TableColumnModel from '../../models/table_column_model'; let Table = React.createClass({ + propTypes: { columnList: React.PropTypes.arrayOf(React.PropTypes.instanceOf(TableColumnModel)), - changeOrder: React.PropTypes.func.isRequired + changeOrder: React.PropTypes.func.isRequired, + tableItem: React.PropTypes.any.isRequired // Optimally, this should check if tableItem is an instance of React.Component or something like that }, + render() { + let TableItem = this.props.tableItem; if(this.props.itemList && this.props.itemList.length > 0) { return ( diff --git a/js/components/piece_list.js b/js/components/piece_list.js index be3bfbe3..6c04b499 100644 --- a/js/components/piece_list.js +++ b/js/components/piece_list.js @@ -5,6 +5,7 @@ import PieceListStore from '../stores/piece_list_store'; import PieceListActions from '../actions/piece_list_actions'; import Table from './ascribe_table/table'; +import TableItem from './ascribe_table/table_item'; import TableItemImg from './ascribe_table/table_item_img'; import TableItemText from './ascribe_table/table_item_text'; @@ -56,7 +57,8 @@ let PieceList = React.createClass({ 'pageSize': props.pageSize } }}> -