diff --git a/src/components/basis/flight/schedule/FlightScheduleGrid.js b/src/components/basis/flight/schedule/FlightScheduleGrid.js index 37db6ab..b9a4b76 100644 --- a/src/components/basis/flight/schedule/FlightScheduleGrid.js +++ b/src/components/basis/flight/schedule/FlightScheduleGrid.js @@ -30,7 +30,7 @@ function FlightScheduleGrid() { const columns = [ { name: '그룹 명', - selector: 'groupNm', + selector: row => row.groupNm, minWidth: '150px', sortable: true, cell: row => { @@ -57,7 +57,7 @@ function FlightScheduleGrid() { }, { name: '기체 소유자', - selector: 'ownerNm', + selector: row => row.ownerNm, minWidth: '150px', sortable: true, cell: row => { @@ -66,7 +66,7 @@ function FlightScheduleGrid() { }, { name: '기체 식별번호', - selector: 'idntfNum', + selector: row => row.idntfNum, minWidth: '150px', sortable: true, cell: row => { @@ -75,7 +75,7 @@ function FlightScheduleGrid() { }, { name: '출발지', - selector: 'startAddress', + selector: row => row.startAddress, minWidth: '150px', sortable: true, cell: row => { @@ -84,7 +84,7 @@ function FlightScheduleGrid() { }, { name: '비행 시작 시간', - selector: 'schFltStDt ', + selector: row => row.schFltStDt, minWidth: '150px', sortable: true, cell: row => { @@ -93,7 +93,7 @@ function FlightScheduleGrid() { }, { name: '도착지', - selector: 'endAddress', + selector: row => row.endAddress, minWidth: '150px', sortable: true, cell: row => { @@ -102,7 +102,7 @@ function FlightScheduleGrid() { }, { name: '비행 종료 시간', - selector: 'schFltEndDt', + selector: row => row.schFltEndDt, minWidth: '150px', sortable: true, cell: row => { @@ -111,7 +111,7 @@ function FlightScheduleGrid() { }, { name: '총 예상 비행시간', - selector: 'groupNm', + selector: row => row.groupNm, minWidth: '150px', sortable: true, cell: row => { @@ -133,7 +133,7 @@ function FlightScheduleGrid() { }, { name: '상태', - selector: 'statusCd', + selector: row => row.statusCd, minWidth: '150px', sortable: true, cell: row => { @@ -151,10 +151,10 @@ function FlightScheduleGrid() { const conditionalRowStyles = [ { - when: row => true, - style: { - backgroundColor: 'red' - } + when: row => { + return true; + }, + classNames: ['primary'] } ]; diff --git a/src/components/crud/grid/GridDatatable.js b/src/components/crud/grid/GridDatatable.js index eae6563..04629b2 100644 --- a/src/components/crud/grid/GridDatatable.js +++ b/src/components/crud/grid/GridDatatable.js @@ -41,6 +41,7 @@ export const GridDatabase = props => { {...(props.onSelectedRowsChange ? { onSelectedRowsChange: props.onSelectedRowsChange } : {})} + conditionalRowStyles={props.conditionalRowStyles} /> diff --git a/src/components/crud/grid/selectableRowsComponent.js b/src/components/crud/grid/selectableRowsComponent.js index 8a761b9..c4afcca 100644 --- a/src/components/crud/grid/selectableRowsComponent.js +++ b/src/components/crud/grid/selectableRowsComponent.js @@ -3,15 +3,22 @@ import React from 'react'; export const selectableRowsComponent = React.forwardRef( ({ onClick, ...rest }, ref) => { + let c = new Date().getTime() + Math.random(); return ( - <> - + - +