Add a client side animation of the collapse of the current standings table

This commit is contained in:
Jonny 2019-05-02 13:39:47 +02:00 committed by JP1998
parent b1810fb2ee
commit 25dfd57708
1 changed files with 13 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import {
Button,
Card,
CardBody,
Collapse,
Container,
ListGroup,
ListGroupItem,
@ -71,22 +72,31 @@ class StatisticsComponent extends React.Component {
<CardBody>
<h1 className="custom-font">Aktuelle Rangliste</h1>
<Table className="table-striped mt-3">
<tbody>
<thead>
<tr>
<th>#</th>
<th>Team Name</th>
<th className="text-center">Match Differenz</th>
<th className="text-center">Punkt Differenz</th>
</tr>
</thead>
<tbody>
{ map(sortedPerformances, (team, index) => (
<TeamRow key={index} teams={this.props.data.teams} teamToShow={team}/>
), 0, (this.state.showFullTable)? undefined : 3) }
), 0, 3) }
</tbody>
<Collapse isOpen={ this.state.showFullTable } tag="tbody">
{ map(sortedPerformances, (team, index) => (
<TeamRow key={index} teams={this.props.data.teams} teamToShow={team}/>
), 3) }
</Collapse>
<tfoot>
<tr>
<td colspan='4'>
<TableButton isFullTableShown={this.state.showFullTable} onToggle={this.toggleShowFullTable}/>
</td>
</tr>
</tbody>
</tfoot>
</Table>
</CardBody>
</Card>