Skip to content

Commit fec1c63

Browse files
authored
Bulk-Edit-App: Freeze top row with Field Names [INTEG-2953] (#10076)
* freeze top row with Field Names * removing unused import
1 parent 170ae20 commit fec1c63

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

apps/bulk-edit/src/locations/Page/components/TableHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const TableHeader: React.FC<TableHeaderProps> = ({
2222
}) => {
2323
return (
2424
<Table.Head style={styles.tableHead}>
25-
<Table.Row>
25+
<Table.Row style={styles.stickyTableRow}>
2626
{fields.length > 0 && (
2727
<Table.Cell as="th" key={DISPLAY_NAME_COLUMN} style={styles.stickyTableHeader}>
2828
Display name

apps/bulk-edit/src/locations/Page/styles.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import tokens from '@contentful/f36-tokens';
2-
import { SortMenu } from './components/SortMenu';
32

43
const SIDEBAR_WIDTH = 220;
54
const STICKY_SPACER_SPACING = 24;
@@ -14,7 +13,7 @@ export const styles = {
1413
position: 'sticky',
1514
left: 0,
1615
top: 0,
17-
zIndex: 3,
16+
zIndex: 4,
1817
background: tokens.colorWhite,
1918
},
2019
mainContent: {
@@ -52,6 +51,12 @@ export const styles = {
5251
borderRight: `1px solid ${tokens.gray300}`,
5352
minWidth: `${CELL_WIDTH}px`,
5453
},
54+
stickyTableRow: {
55+
background: tokens.colorWhite,
56+
position: 'sticky',
57+
top: 0,
58+
zIndex: 2,
59+
},
5560
cell: {
5661
borderRight: `1px solid ${tokens.gray300}`,
5762
minWidth: `${CELL_WIDTH}px`,
@@ -74,7 +79,7 @@ export const styles = {
7479
stickySpacer: {
7580
position: 'sticky',
7681
left: SIDEBAR_WIDTH,
77-
zIndex: 1,
82+
zIndex: 3,
7883
top: 0,
7984
background: tokens.colorWhite,
8085
width: STICKY_SPACER_SPACING,

0 commit comments

Comments
 (0)