From 2185d32a2c704ab438d40c7553a2539c2887ceec Mon Sep 17 00:00:00 2001 From: sanguu516 Date: Wed, 5 Jun 2024 09:07:33 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B5=AC=EC=97=AD=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/crud/grid/GridDatatable.js | 1 + src/components/flight/FlightApprovalsTable.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/crud/grid/GridDatatable.js b/src/components/crud/grid/GridDatatable.js index fbe74be4..6f79440c 100644 --- a/src/components/crud/grid/GridDatatable.js +++ b/src/components/crud/grid/GridDatatable.js @@ -28,6 +28,7 @@ export const GridDatabase = props => { paginationTotalRows={props.total} paginationPerPage={props.paginationPerPage} paginationRowsPerPageOptions={props.paginationRowsPerPageOptions} + onRowClicked={props.handleRowClick} // paginationServer subHeader={false} columns={props.columns} diff --git a/src/components/flight/FlightApprovalsTable.js b/src/components/flight/FlightApprovalsTable.js index b92d3304..8de19b8b 100644 --- a/src/components/flight/FlightApprovalsTable.js +++ b/src/components/flight/FlightApprovalsTable.js @@ -20,7 +20,7 @@ export default function FlightApprovalsTable(props) { classNames: ['flight-approval-row'] }, { - when: row => row.areaList[0].approvalCd === props.selected, + when: row => row.areaList[0].planAreaSno === props.selected, classNames: ['flight-approval-row-click'] } ]; @@ -258,6 +258,11 @@ export default function FlightApprovalsTable(props) { // } // }; + const handleRowClick = row => { + props.handlerDetail(row.areaList[0]); + // 여기에 클릭 이벤트를 처리하는 코드를 작성하세요. + }; + return (
@@ -281,6 +286,7 @@ export default function FlightApprovalsTable(props) { // customStyles={customStyles} conditionalRowStyles={conditionalRowStyles} FlightInfoComponent={FlightInfoComponent} + handleRowClick={handleRowClick} /> ) : (