Skip to content
This repository was archived by the owner on Jan 15, 2022. It is now read-only.
This repository was 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

@squll1

Description

@squll1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions