From a05cc768fd1c181857dff617536739db0631b64e Mon Sep 17 00:00:00 2001 From: Jonny Date: Fri, 3 May 2019 13:25:47 +0200 Subject: [PATCH] Fix a bug which resets the striping after the last element that has not been hidden --- js/components/StandingsTable.js | 8 ++++---- js/utils/rangedmap.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/components/StandingsTable.js b/js/components/StandingsTable.js index ecdb6ce..ea461ee 100644 --- a/js/components/StandingsTable.js +++ b/js/components/StandingsTable.js @@ -36,7 +36,7 @@ export class StandingsTable extends React.Component {

Aktuelle Rangliste

- +
@@ -47,12 +47,12 @@ export class StandingsTable extends React.Component { { rangedmap(sortedPerformances, (team, index) => ( - + ), 0, 3) } { rangedmap(sortedPerformances, (team, index) => ( - + ), 3) } @@ -80,7 +80,7 @@ class TeamRow extends React.Component { render() { return ( - + diff --git a/js/utils/rangedmap.js b/js/utils/rangedmap.js index 1373ebe..adedcb6 100644 --- a/js/utils/rangedmap.js +++ b/js/utils/rangedmap.js @@ -1,4 +1,4 @@ export function rangedmap(arr, func, start, end) { - return arr.slice(start, end).map(func); + return arr.slice(start, end).map((element, index) => func(element, start + index)); }
#
{ this.props.teamToShow.rank } {findTeam(this.props.teams, this.props.teamToShow.team).name} { this.props.teamToShow.winlossdifferential }