Skip to content

Bugfix LastUpdatedCell styles #225

Merged
merged 2 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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