From a41f5d4bf5383d146684eadef9850874292ffd31 Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Mon, 5 Sep 2022 15:18:36 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=20?= =?UTF-8?q?=D0=B2=20=D1=82=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B0=D1=85=20?= =?UTF-8?q?=D0=B2=D0=BE=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B5=20?= =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D1=80=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Measure/View.jsx | 73 ++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/src/pages/Measure/View.jsx b/src/pages/Measure/View.jsx index e87fd96..5f1b24d 100755 --- a/src/pages/Measure/View.jsx +++ b/src/pages/Measure/View.jsx @@ -10,45 +10,42 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? ( ) : ( - {columns.map((cols, j) => { - let rowPosition = 0 - let columnPosition = 1 + j * 2 - return cols.map((column) => { - rowPosition++ - return ( - - - {column.title} - + {columns.map((cols, i) => { + const columnPosition = 1 + i * 2 + return cols.map((column, j) => ( + + + {column.title} + - - {column.render ? ( - - {column.render(item[column.dataIndex])} - - ) : ( -

- {item[column.dataIndex]} -

- )} -
-
- )}) + + {column.render ? ( + + {column.render(item[column.dataIndex])} + + ) : ( +

+ {item[column.dataIndex]} +

+ )} +
+
+ )) }).flat()}
))