From 48823b83aa712ac5b1b8a35fe21011d805fe5de4 Mon Sep 17 00:00:00 2001 From: "joonhyuk.han" Date: Thu, 29 Dec 2022 11:51:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=9C=EA=B7=BC=EC=9E=90=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20csv=20=EC=A0=80=EC=9E=A5=20=EC=8B=9C=20=ED=95=9C?= =?UTF-8?q?=EA=B8=80=20=EA=B9=A8=EC=A7=80=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20#118?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DashboardPage/MonthlyPerfectUserTable.jsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx b/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx index 4cb1e13..bec9158 100644 --- a/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx +++ b/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx @@ -4,8 +4,8 @@ import CardContent from "@mui/material/CardContent"; import Box from "@mui/material/Box"; import { DataGrid, - GridToolbarContainer, - GridToolbarExport, + GridToolbarExportContainer, + GridCsvExportMenuItem, } from "@mui/x-data-grid"; import Typography from "@mui/material/Typography"; @@ -25,22 +25,23 @@ const columns = [ }, ]; +const csvOptions = { utf8WithBom: true }; + function CustomToolbar() { return ( - - - + + + ); } function MonthlyPerfectUserTable(props) { const { data } = props; const rows = []; - if (data.length > 0){ + if (data.length > 0) { data.forEach((user) => { - if (user.isPerfectAttendance) - rows.push(user); - }) + if (user.isPerfectAttendance) rows.push(user); + }); } return (