diff --git a/src/common/ResponsiveTable.tsx b/src/common/ResponsiveTable.tsx index de86e45..d0a58dd 100644 --- a/src/common/ResponsiveTable.tsx +++ b/src/common/ResponsiveTable.tsx @@ -1,4 +1,4 @@ -import { Box, CircularProgress, Collapse, darken, IconButton, InputAdornment, Paper, SxProps, Table, TableBody, TableCell, TableContainer, TableHead, TablePagination, TableRow, TextField, Theme, Typography } from "@mui/material"; +import { Box, CircularProgress, Collapse, darken, Grid2, IconButton, InputAdornment, Paper, SxProps, Table, TableBody, TableCell, TableContainer, TableHead, TablePagination, TableRow, TextField, Theme, Typography } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { ChevronRight, Close, Search } from "@mui/icons-material" import { useEffect, useState } from "react"; @@ -122,6 +122,33 @@ export default function ResponsiveTable(props: Props) { setInputSearchText("") } + const searchBar = () => { + return ( + setInputSearchText(e.currentTarget.value)} + InputProps={{ + startAdornment: ( + + + + ), + endAdornment: ( + + + + + + ), + }} + /> + ) + } + if (isMobile) return ( Hello! @@ -132,44 +159,27 @@ export default function ResponsiveTable(props: Props) { - - {title && - {typeof(title) === "string" ? - - {title} - - : - - title - - } - } - { setSearchText && - - setInputSearchText(e.currentTarget.value)} - InputProps={{ - startAdornment: ( - - - - ), - endAdornment: ( - - - - - - ), - }} - /> - - } + + + + + {typeof(title) === "string" ? + + {title} + + : + title && + title + + } + + + {setSearchText && + {searchBar()} + } + + + { renderGutter && }