@@ -171,28 +169,44 @@ export default function ScoringChart(props: Props) {
handleChange(event, rowIndex, columnIndex)}
+ onChange={(event) =>
+ handleChange(event, rowIndex, columnIndex)
+ }
/>
))}
-
-
{
- data[currentSplit][rowIndex].some((value: string) => value === '') ? '0' :
- data[currentSplit][rowIndex].reduce((a: string, b: string) => {
- return addScores(a, b)
- }, 0)
- } |
-
{
- data[currentSplit][rowIndex].some((value: string) => value === '') ? '0' :
- data[currentSplit].slice(0, rowIndex + 1).reduce((a: any, b: any) => {
- return a + b.reduce((c: any, d: any) => {
- return addScores(c, d);
- }, 0);
- }, 0)
- } |
+
+
+ {data[currentSplit][rowIndex].some(
+ (value: string) => value === ""
+ )
+ ? "0"
+ : data[currentSplit][rowIndex].reduce(
+ (a: string, b: string) => {
+ return addScores(a, b);
+ },
+ 0
+ )}
+ |
+
+ {data[currentSplit][rowIndex].some(
+ (value: string) => value === ""
+ )
+ ? "0"
+ : data[currentSplit]
+ .slice(0, rowIndex + 1)
+ .reduce((a: any, b: any) => {
+ return (
+ a +
+ b.reduce((c: any, d: any) => {
+ return addScores(c, d);
+ }, 0)
+ );
+ }, 0)}
+ |
))}