import { Meteor } from 'meteor/meteor';
import React, { useState } from 'react';
import { useTracker } from 'meteor/react-meteor-data';
import _ from 'lodash';
export default class GridTable2 extends React.Component {
constructor(props) {
super(props)
this.state = {
rows: [{_id: 1234, name: "Fred"}, {_id: 1235, }],
columns: [{id: "first", value: row => {return row._id}}, {id: "second", value: row => {return row.name}}]
}
}
render() {
console.log("Rendering GridTable2")
return
| Test | Test2 |
{/**/}
{/**/}
{/*
*/}
{/*{this.state.rows.map((row) => )}*/}
}
}
class GridTableRow extends React.Component {
constructor(props) {
super(props)
this.state = {
columns: props.columns,
row: props.row,
}
}
render() {
console.log("Rendering GridTableRow")
return
{this.state.columns.map((column)=>)}
}
}
class GridTableCell extends React.Component {
constructor(props) {
super(props)
console.log(props);
this.state = {
row: props.row,
column: props.column,
value: props.column.value(props.row)
}
}
render() {
console.log("Rendering GridTableCell")
return {this.state.value} |
}
}