1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-07 06:37:01 +02:00

Fix issue in sticky-table-column pattern

This commit is contained in:
Phuoc Nguyen
2021-03-28 19:50:35 +07:00
parent 2e3ca01022
commit 58b1c76d45

View File

@@ -59,14 +59,17 @@ const Details: React.FC<{}> = () => {
return (
<th
key={index}
style={
Object.assign({}, {
padding: '16px',
}, index === 0 ? {
style={(
index === 0
? {
backgroundColor: '#ddd',
left: 0,
padding: '16px',
position: 'sticky',
} : {},
}
: {
padding: '16px',
}
)}
>
<div style={{ width: '200px' }}>
@@ -92,14 +95,15 @@ const Details: React.FC<{}> = () => {
return (
<td
key={col}
style={
Object.assign({}, {
padding: '16px',
}, col === 0 ? {
style={(
col === 0 ? {
backgroundColor: '#ddd',
left: 0,
padding: '16px',
position: 'sticky',
} : {},
} : {
padding: '16px',
}
)}
>
{