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:
@@ -59,14 +59,17 @@ const Details: React.FC<{}> = () => {
|
|||||||
return (
|
return (
|
||||||
<th
|
<th
|
||||||
key={index}
|
key={index}
|
||||||
style={
|
style={(
|
||||||
Object.assign({}, {
|
index === 0
|
||||||
padding: '16px',
|
? {
|
||||||
}, index === 0 ? {
|
|
||||||
backgroundColor: '#ddd',
|
backgroundColor: '#ddd',
|
||||||
left: 0,
|
left: 0,
|
||||||
|
padding: '16px',
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
} : {},
|
}
|
||||||
|
: {
|
||||||
|
padding: '16px',
|
||||||
|
}
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div style={{ width: '200px' }}>
|
<div style={{ width: '200px' }}>
|
||||||
@@ -92,14 +95,15 @@ const Details: React.FC<{}> = () => {
|
|||||||
return (
|
return (
|
||||||
<td
|
<td
|
||||||
key={col}
|
key={col}
|
||||||
style={
|
style={(
|
||||||
Object.assign({}, {
|
col === 0 ? {
|
||||||
padding: '16px',
|
|
||||||
}, col === 0 ? {
|
|
||||||
backgroundColor: '#ddd',
|
backgroundColor: '#ddd',
|
||||||
left: 0,
|
left: 0,
|
||||||
|
padding: '16px',
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
} : {},
|
} : {
|
||||||
|
padding: '16px',
|
||||||
|
}
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user