| @@ -1,10 +1,12 @@ | |||||
| // material-ui | // material-ui | ||||
| import * as React from 'react'; | import * as React from 'react'; | ||||
| import { | |||||
| DataGrid, | |||||
| } from "@mui/x-data-grid"; | |||||
| import { | import { | ||||
| Button | Button | ||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import { useEffect } from "react"; | import { useEffect } from "react"; | ||||
| import {FiDataGrid} from "components/FiDataGrid"; | |||||
| import * as DateUtils from "utils/DateUtils"; | import * as DateUtils from "utils/DateUtils"; | ||||
| import * as StatusUtils from "./PublicNoteStatusUtils"; | import * as StatusUtils from "./PublicNoteStatusUtils"; | ||||
| import {useNavigate} from "react-router-dom"; | import {useNavigate} from "react-router-dom"; | ||||
| @@ -12,6 +14,7 @@ import {useNavigate} from "react-router-dom"; | |||||
| export default function SearchPublicNoticeTable({ recordList }) { | export default function SearchPublicNoticeTable({ recordList }) { | ||||
| const [rows, setRows] = React.useState(recordList); | const [rows, setRows] = React.useState(recordList); | ||||
| const [rowModesModel] = React.useState({}); | |||||
| const navigate = useNavigate() | const navigate = useNavigate() | ||||
| const handleDetailClick = (params) => () => { | const handleDetailClick = (params) => () => { | ||||
| @@ -95,14 +98,32 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| return ( | return ( | ||||
| <div style={{ height: 400, width: '100%' }}> | <div style={{ height: 400, width: '100%' }}> | ||||
| <FiDataGrid | |||||
| <DataGrid | |||||
| hideFooterSelectedRowCount={true} | |||||
| rows={rows} | rows={rows} | ||||
| columns={columns} | columns={columns} | ||||
| editMode="row" | |||||
| rowModesModel={rowModesModel} | |||||
| initialState={{ | initialState={{ | ||||
| pagination: { | pagination: { | ||||
| paginationModel: { page: 0, pageSize: 5 }, | paginationModel: { page: 0, pageSize: 5 }, | ||||
| }, | }, | ||||
| }} | }} | ||||
| pageSizeOptions={[5, 10]} | |||||
| autoHeight | |||||
| sx={{ | |||||
| boxShadow: 1, | |||||
| border: 1, | |||||
| borderColor: '#DDD', | |||||
| '& .MuiDataGrid-cell': { | |||||
| border: 1, | |||||
| borderColor: "#EEE" | |||||
| }, | |||||
| '& .MuiDataGrid-footerContainer':{ | |||||
| border: 1, | |||||
| borderColor: "#EEE" | |||||
| } | |||||
| }} | |||||
| /> | /> | ||||
| </div> | </div> | ||||
| ); | ); | ||||