2015-05-20 14:48:57 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import TableColumnMixin from '../mixins/table_column_mixin';
|
|
|
|
import GeneralUtils from '../utils/general_utils';
|
|
|
|
|
|
|
|
let TableHeader = React.createClass({
|
|
|
|
mixins: [TableColumnMixin],
|
|
|
|
propTypes: {
|
|
|
|
columnMap: React.PropTypes.object.isRequired
|
|
|
|
},
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
let columnMapValuesList = GeneralUtils.valuesOfObject(this.props.columnMap);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
|
|
|
<div className="row">
|
|
|
|
{columnMapValuesList.map((val, i) => {
|
2015-05-20 16:10:02 +02:00
|
|
|
|
|
|
|
let columnClass = this.calcColumnClasses(this.props.columnMap, i);
|
|
|
|
|
2015-05-20 14:48:57 +02:00
|
|
|
return (
|
2015-05-20 16:10:02 +02:00
|
|
|
<div className={columnClass + ' ascribe-table-header-column'} key={i}>
|
|
|
|
{val.displayName}
|
2015-05-20 14:48:57 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default TableHeader;
|