Skip to content

Commit

Permalink
Merge pull request #225 from ECN/bugfix-lastupdated-styles
Browse files Browse the repository at this point in the history
Bugfix LastUpdatedCell styles
  • Loading branch information
campb303 authored Jul 30, 2021
2 parents 2cc34f4 + ae7bc7e commit e44808a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/ItemTable/ItemTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) {
width: "100%"
},
hoverBackgroundColor: {
"&:hover": {
"&:hover > *": {
// The !important is placed here to enforce CSS specificity.
// See: https://material-ui.com/styles/advanced/#css-injection-order
backgroundColor: `${theme.palette.primary[200]} !important`,
Expand All @@ -42,7 +42,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) {
// are a hotfix to force the table body to have height until a better solution is found.
VirtualizedTableStyles: {
height: '82vh !important',
display:"table-row"
display: "table-row"
},
tableMargin: {
marginTop: theme.spacing(2)
Expand All @@ -68,7 +68,7 @@ export default function ItemTable({ data, rowCanBeSelected, loading }) {
{ Header: 'Last Updated', accessor: 'last_updated', sortInverted: true },
{ Header: 'Department', accessor: 'department' },
{ Header: 'Building', accessor: 'building' },
{ Header: 'Date Received', accessor: 'date_received', sortInverted: true , }
{ Header: 'Date Received', accessor: 'date_received', sortInverted: true, }
], []);
const tableInstance = useTable(
{
Expand Down
2 changes: 1 addition & 1 deletion src/components/LastUpdatedCell/LastUpdatedCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function LastUpdatedCell({ time, ItemTableCellProps }) {
const week = day * 7;
const month = week * 4;

let backgroundColor = theme.palette.background.paper;
let backgroundColor = "inherit";

// 1-6 days old
if (timeDelta > day && timeDelta <= week) {
Expand Down

0 comments on commit e44808a

Please sign in to comment.