Skip to content

Commit

Permalink
fix: table background (#392)
Browse files Browse the repository at this point in the history
This PR fixes the issue with the ability of highlight the 
selected cell without changing the behaviour of the rest of the table
  • Loading branch information
Koustavd18 authored Dec 19, 2024
1 parent 7900103 commit 7d46c04
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/pages/Stream/Views/Explore/StaticLogTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,18 @@ const Table = (props: { primaryHeaderHeight: number }) => {
},
style: {
border: 'none',
background: row.index % 2 === 0 ? '#f8f9fa' : 'white',
backgroundColor:
rowNumber &&
(() => {
const [start, end] = rowNumber.split(':').map(Number);
return row.index >= start && row.index <= end;
})()
row.index % 2 === 0
? rowNumber &&
row.index >= _.toNumber(rowNumber.split(':')[0]) &&
row.index <= _.toNumber(rowNumber.split(':')[1])
? '#E8EDFE'
: '#f8f9fa'
: rowNumber &&
row.index >= _.toNumber(rowNumber.split(':')[0]) &&
row.index <= _.toNumber(rowNumber.split(':')[1])
? '#E8EDFE'
: '',
: 'white',
},
};
}}
Expand Down

0 comments on commit 7d46c04

Please sign in to comment.