diff --git a/src/components/board/MileageSemesterItem.tsx b/src/components/board/MileageSemesterItem.tsx
index c29bc16..95853e4 100644
--- a/src/components/board/MileageSemesterItem.tsx
+++ b/src/components/board/MileageSemesterItem.tsx
@@ -177,7 +177,7 @@ export default function MileageSemesterItem() {
'2022-01',
'웹 서비스 캠프',
30,
- 'y',
+ true,
'2023-08-21',
@@ -188,7 +188,7 @@ export default function MileageSemesterItem() {
'2022-01',
'웹 서비스 캠프',
30,
- 'y',
+ true,
'2023-08-21',
@@ -199,7 +199,7 @@ export default function MileageSemesterItem() {
'2022-01',
'웹 서비스 캠프',
30,
- 'y',
+ true,
'2023-08-21',
@@ -210,7 +210,7 @@ export default function MileageSemesterItem() {
'2022-01',
'웹 서비스 캠프',
30,
- 'y',
+ false,
'2023-08-21',
@@ -221,7 +221,7 @@ export default function MileageSemesterItem() {
'2022-02',
'웹 서비스 캠프',
30,
- 'y',
+ true,
'2023-08-21',
),
@@ -231,7 +231,7 @@ export default function MileageSemesterItem() {
'2022-02',
'웹 서비스 캠프',
30,
- 'y',
+ false,
'2023-08-21',
),
diff --git a/src/components/common/CustomTable.tsx b/src/components/common/CustomTable.tsx
index 133f279..ce09b46 100644
--- a/src/components/common/CustomTable.tsx
+++ b/src/components/common/CustomTable.tsx
@@ -40,8 +40,9 @@ import { useEffect } from 'react';
import { setMileageCategoryList } from 'src/redux/slices/data';
import SemesterDropdown from './Filter/SemesterDropdown';
import { id } from 'date-fns/locale';
-import isVisibleDropdown from './Filter/IsVisibleDropdown';
+
import IsVisibleDropdown from './Filter/IsVisibleDropdown';
+import ItemAutoComplete from './Filter/ItemAutoComplete';
/**
* @brief 반응형 구축
@@ -225,6 +226,7 @@ function EnhancedTableToolbar(props: EnhancedTableToolbarProps) {
+
{/* 학기 필터링 */}
@@ -304,6 +306,7 @@ export default function EnhancedTable({ originalRows, headCells, type }) {
const category = useSelector((state) => state.filter.category);
const semester = useSelector((state) => state.filter.semester);
const isVisible = useSelector((state) => state.filter.isVisible);
+ const item = useSelector((state) => state.filter.item);
/**
* @brief 필터링
*/
@@ -320,12 +323,15 @@ export default function EnhancedTable({ originalRows, headCells, type }) {
copyRows = copyRows.filter((row) => row.isVisible === isVisible);
console.log(copyRows[0]?.isVisible, isVisible);
}
+ if (item && item !== '전체') {
+ copyRows = copyRows.filter((row) => row.item === item);
+ }
setRows(copyRows);
// !category
// ? setRows(originalRows)
// : setRows(originalRows.filter((row) => row.category === category));
- }, [category, semester, isVisible]);
+ }, [category, semester, isVisible, item]);
const [order, setOrder] = React.useState('asc');
const [orderBy, setOrderBy] = React.useState('calories');