Add a client side animation of the collapse of the current standings table
This commit is contained in:
parent
b1810fb2ee
commit
25dfd57708
|
|
@ -5,6 +5,7 @@ import {
|
||||||
Button,
|
Button,
|
||||||
Card,
|
Card,
|
||||||
CardBody,
|
CardBody,
|
||||||
|
Collapse,
|
||||||
Container,
|
Container,
|
||||||
ListGroup,
|
ListGroup,
|
||||||
ListGroupItem,
|
ListGroupItem,
|
||||||
|
|
@ -71,22 +72,31 @@ class StatisticsComponent extends React.Component {
|
||||||
<CardBody>
|
<CardBody>
|
||||||
<h1 className="custom-font">Aktuelle Rangliste</h1>
|
<h1 className="custom-font">Aktuelle Rangliste</h1>
|
||||||
<Table className="table-striped mt-3">
|
<Table className="table-striped mt-3">
|
||||||
<tbody>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>Team Name</th>
|
<th>Team Name</th>
|
||||||
<th className="text-center">Match Differenz</th>
|
<th className="text-center">Match Differenz</th>
|
||||||
<th className="text-center">Punkt Differenz</th>
|
<th className="text-center">Punkt Differenz</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{ map(sortedPerformances, (team, index) => (
|
{ map(sortedPerformances, (team, index) => (
|
||||||
<TeamRow key={index} teams={this.props.data.teams} teamToShow={team}/>
|
<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>
|
<tr>
|
||||||
<td colspan='4'>
|
<td colspan='4'>
|
||||||
<TableButton isFullTableShown={this.state.showFullTable} onToggle={this.toggleShowFullTable}/>
|
<TableButton isFullTableShown={this.state.showFullTable} onToggle={this.toggleShowFullTable}/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tfoot>
|
||||||
</Table>
|
</Table>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue