From a4efbb0d708da8ff9b2dde860ab0e0237a1378e8 Mon Sep 17 00:00:00 2001 From: Eryk Mika <eryk.mika@wpdesk.eu> Date: Thu, 27 Feb 2025 13:59:43 +0100 Subject: [PATCH] fix: multi color fix --- src/FlexibleTable/FlexibleTable.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FlexibleTable/FlexibleTable.jsx b/src/FlexibleTable/FlexibleTable.jsx index 7ff2c36..2940e2f 100644 --- a/src/FlexibleTable/FlexibleTable.jsx +++ b/src/FlexibleTable/FlexibleTable.jsx @@ -385,9 +385,9 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, </thead> <tbody className={"fitb-item-table-body"}> - {Array.from({length: 2}).map((_, index) => ( + {Array.from({length: 2}).map((_, trIndex) => ( <tr className={"fitb-item-table-row"} style={{ - background: (multipleBodyBackground && index === 1) ? bodyBackgroundOdd : bodyBackground, + background: (multipleBodyBackground && trIndex === 1) ? bodyBackgroundOdd : bodyBackground, borderStyle: "solid", borderColor: bodyBorderRowColor, borderTopWidth: bodyBorderRowWidthTop, @@ -411,7 +411,7 @@ export default function FlexibleTable({attributes, setAttributes, placeholders, key={index} value={row} style={{ - color: (multipleBodyBackground && index === 1) ? bodyTextColorOdd : bodyTextColor, + color: (multipleBodyBackground && trIndex === 1) ? bodyTextColorOdd : bodyTextColor, textAlign: bodyTextAlign, fontStyle: bodyFontStyle, fontSize: bodyFontSize, -- GitLab