mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-28 16:19:52 +02:00
Add sticky table column
This commit is contained in:
@@ -45,7 +45,7 @@ const Details: React.FC<{}> = () => {
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<thead style={{ }}>
|
||||
<thead>
|
||||
<tr>
|
||||
{
|
||||
Array(3).fill(0).map((_, index) => {
|
||||
@@ -98,9 +98,9 @@ const Details: React.FC<{}> = () => {
|
||||
/* Background color */
|
||||
background-color: #ddd;
|
||||
|
||||
/* Sticky to the top */
|
||||
/* Stick to the top */
|
||||
position: sticky;
|
||||
top: 0px;
|
||||
top: 0;
|
||||
|
||||
/* Displayed on top of other rows when scrolling */
|
||||
z-index: 9999;
|
||||
@@ -118,7 +118,11 @@ const Details: React.FC<{}> = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<RelatedPatterns patterns={[Pattern.StickyHeader]} />
|
||||
<RelatedPatterns
|
||||
patterns={[
|
||||
Pattern.StickyHeader, Pattern.StickySections, Pattern.StickyTableColumn,
|
||||
]}
|
||||
/>
|
||||
</DetailsLayout>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user