import React, { PropTypes } from 'react'
import { Link } from 'react-router'
export default class List extends React.Component{
constructor(props) {
super(props);
}
renderHeader(){
if( !this.props.columns ) return null
return (
{
this.props.columns.map( (col, col_index) => {
return
{ col.name }
})
}
)
}
render(){
return (
{ this.renderHeader() }
{
this.props.rows.map( (row, row_index) => {
return (
{
this.props.columns.map( (col, col_index) => {
return
{ row[col.name] }
})
}
)
})
}
);
}
}