Skip to content

Commit

Permalink
Removed uncessary desc key from intialState.sortBy in the table optio…
Browse files Browse the repository at this point in the history
…n in ItemTable component
  • Loading branch information
wrigh393 committed Jan 8, 2021
1 parent bb68f11 commit 7373d88
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/components/ItemTable/ItemTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export default function ItemTable({ data, rowCanBeSelected }) {
inactiveSortIcon: {
opacity: 0.2,
},
container: {
maxHeight: 500,
},
rowSelected: {
backgroundColor: theme.palette.type === 'light' ? theme.palette.primary[100] : theme.palette.primary[600],
},
Expand Down Expand Up @@ -71,18 +74,18 @@ export default function ItemTable({ data, rowCanBeSelected }) {
},
initialState: {
sortBy: [
{ id: 'number', desc: false },
{ id: 'lastUpdated', desc: false },
]
{ id: 'number' },
{ id: 'lastUpdated' },
],
}
},
useFilters, useFlexLayout, useSortBy,
);
const { getTableProps, getTableBodyProps, headerGroups, rows, prepareRow, } = tableInstance;

return (
<TableContainer component={Paper} >
<Table {...getTableProps} aria-label="Table of Queue Items" >
<TableContainer className={classes.container} >
<Table stickyHeader {...getTableProps} aria-label="Table of Queue Items" >
<TableHead>
{headerGroups.map(headerGroup => (
<TableRow {...headerGroup.getHeaderGroupProps()}>
Expand Down

0 comments on commit 7373d88

Please sign in to comment.