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} /> ) : (