Closed slashwhatever closed 8 years ago
Just trying to run up a very basic example grid.
Code:
/* /components/FixedDataTableTest.jsx */ import React, {Component} from 'react'; import {Table, Column, Cell} from 'fixed-data-table'; class FixedDataTableTest extends Component { constructor(props) { super(props); } render() { // Table data as a list of array. const rows = [ ['a1', 'b1', 'c1'], ['a2', 'b2', 'c2'], ['a3', 'b3', 'c3'], ]; return ( <Table rowHeight={50} rowsCount={rows.length} width={1000} height={500} {...this.props}> <Column header={<Cell>Col 1</Cell>} cell={<Cell>Column 1 static content</Cell>} width={250} /> <Column header={<Cell>Col 3</Cell>} cell={({rowIndex, ...props}) => ( <Cell {...props}> Data for column 3: {rows[rowIndex][2]} </Cell> )} width={250} /> </Table> ); } } export default FixedDataTableTest; /* /GridTestApp.jsx */ import FixedDataTableTest from './components/FixedDataTableTest.jsx'; ... ReactDOM.render( <FixedDataTableTest />, document.getElementById('grid-element') ); ...
Over 100 errors in the console, all along these lines: https://puu.sh/qOUbt/1cd1d9ed7f.png
Just trying to run up a very basic example grid.
Code:
Over 100 errors in the console, all along these lines: https://puu.sh/qOUbt/1cd1d9ed7f.png