Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

The only possible children of <Table> are <Thead>, <Tr>, or one <Tfoot>. #320

Closed
squll1 opened this issue Sep 7, 2016 · 3 comments
Closed

Comments

@squll1
Copy link

squll1 commented Sep 7, 2016

try to use the Tr component in the Table Component.

// PlayerList Component (PlayerList.js)
<Table className="player-list">
              {
                players.map((data, i) => {
                  return (
                    <PlayerItem data={data}/>
                  )
                })
              }
</Table>
// PlayerItem Component (PlayerItem.js)
import React from 'react';
import {Table, Thead, Tr, Th, Td} from 'reactable';

class PlayerItem extends React.Component {
  render() {
    return (
      <Tr key={this.props.data.id}>
        <Td column="Name">{this.props.data.name}</Td><Td column="Age">{this.props.data.age}</Td>
      </Tr>
    );
  }
}

export default PlayerItem;

'The only possible children of <Table> are <Thead>, <Tr>, or one <Tfoot>.'
With the above message is output list is not rendered.

@ryanbelt
Copy link

got the same problem

@kinyat
Copy link

kinyat commented Sep 29, 2016

Same here. It would be good to accept the example above :)

@glittershark
Copy link
Owner

see #196

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants