From ed4fe093e08898afff478a209d2a2a3e106f8b8b Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Thu, 26 Aug 2021 11:32:19 +0500 Subject: [PATCH] CF2-55: Fixed row selection (prevented selection of several rows at a time) --- src/pages/ClusterSections.jsx | 8 +++----- src/pages/ClusterWells.jsx | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/ClusterSections.jsx b/src/pages/ClusterSections.jsx index 3979723..b067b4e 100644 --- a/src/pages/ClusterSections.jsx +++ b/src/pages/ClusterSections.jsx @@ -123,13 +123,12 @@ export default function ClusterSections({clusterData}) { useEffect(() => { let resArr = [] - + let i = 1; clusterData.statsWells?.forEach(el => { - el.sections.forEach(section => { let row = { - key: el.id, - id: el.id, + key: section.id + i++, + id: section.id + i++, caption: el.caption, sectionType: section.caption, sectionWellDepthPlan: section.plan.wellDepthEnd, @@ -179,7 +178,6 @@ export default function ClusterSections({clusterData}) { scroll={{ x: true, y: 620}} rowSelection={rowSelection} pagination={false} - className={'mt-20px'} /> diff --git a/src/pages/ClusterWells.jsx b/src/pages/ClusterWells.jsx index bc6a912..f8e898b 100644 --- a/src/pages/ClusterWells.jsx +++ b/src/pages/ClusterWells.jsx @@ -108,7 +108,6 @@ export default function ClusterWells({clusterData}) { bordered pagination={false} rowKey={(record) => record.id} - className={'mt-20px'} /> ) } \ No newline at end of file