From d96cdd03f273d96689105f3f3a47f1e4ef2aecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Tue, 23 Jul 2024 14:24:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=B4=ED=95=AD=EA=B3=BC=20=EB=B9=84?= =?UTF-8?q?=ED=96=89=EA=B5=AC=EC=97=AD=20=EC=84=A0=ED=83=9D=EC=8B=9C=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flight/OperationApprovalsContainer.js | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/containers/flight/OperationApprovalsContainer.js b/src/containers/flight/OperationApprovalsContainer.js index fb4cec85..8dd68554 100644 --- a/src/containers/flight/OperationApprovalsContainer.js +++ b/src/containers/flight/OperationApprovalsContainer.js @@ -107,8 +107,8 @@ export default function OperationApprovalsContainer({ mode }) { }, []); useEffect(() => { - if (areaCoordList.length !== 0) { - handlerAreaDraw(); + if (areaCoordList.length > 0) { + if (areaCoordList[0].planSno !== 0) handlerAreaDraw(); } else { handlerRemoveArea(); } @@ -123,6 +123,22 @@ export default function OperationApprovalsContainer({ mode }) { if (features) { setSelected([features.properties.key]); + const targetValue = features.properties.key; + + const rows = document.getElementsByClassName('ant-table-row'); + + const matchingRow = Array.from(rows).find(row => { + const rowKey = row.getAttribute('data-row-key'); + return rowKey.startsWith(targetValue); + }); + + if (matchingRow) { + matchingRow.scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'nearest' + }); + } } });