diff --git a/src/components/sortable_table/SortableTable.js b/src/components/sortable_table/SortableTable.js index 69da0b65f..f68ba6316 100644 --- a/src/components/sortable_table/SortableTable.js +++ b/src/components/sortable_table/SortableTable.js @@ -51,7 +51,6 @@ import Paper from '@mui/material/Paper'; import { ThemeProvider } from '@mui/material/styles'; import EnhancedTableHead from './EnhancedTableHead'; import { theme } from './Themes'; -import {isNil} from 'lodash/fp'; function descendingComparator(a, b, orderBy) { if (b[orderBy] < a[orderBy]) { @@ -86,11 +85,12 @@ export default function SortableTable(props) { const { rows, headCells, - defaultSort + defaultSort = 'darCode', + cellAlignment = 'center' } = props; const [order, setOrder] = useState('asc'); - const [orderBy, setOrderBy] = useState(isNil(props.defaultSort) ? 'darCode' : props.defaultSort); + const [orderBy, setOrderBy] = useState(defaultSort); const [selected, setSelected] = useState([]); const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState(10); @@ -189,7 +189,7 @@ export default function SortableTable(props) { id={labelId} scope='row' padding='none' - align='center'> + align={cellAlignment}> {row[category]} ))} diff --git a/src/pages/data_submitter_console/DataSubmitterDatasetsTable.jsx b/src/pages/data_submitter_console/DataSubmitterDatasetsTable.jsx index f4a5c9473..581ad2b4c 100644 --- a/src/pages/data_submitter_console/DataSubmitterDatasetsTable.jsx +++ b/src/pages/data_submitter_console/DataSubmitterDatasetsTable.jsx @@ -109,7 +109,11 @@ export default function DataSubmitterDatasetsTable(props) { init(); }, [props, redrawRows]); - const sortableTable = ; + const sortableTable = ; return isLoading ? spinner : sortableTable; } \ No newline at end of file