Skip to content

Commit ca109ca

Browse files
committed
feat(data explorer): make head row sticky
1 parent 9e4f058 commit ca109ca

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/app-builder/src/components/DataModelExplorer/DataTableRender.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,16 @@ function DataTable({ caseId, pivotObject, table, list, pagination, navigateTo }:
253253
</MenuCommand.Menu>
254254
) : null}
255255
</div>
256-
<div className="flex overflow-x-auto" ref={wrapperRef}>
256+
<div className="flex max-h-[480px] overflow-auto" ref={wrapperRef}>
257257
<div ref={sentinelRef} className="w-0" />
258258
{list.length > 0 ? (
259259
<table className="mb-4 min-w-full border-separate border-spacing-0">
260260
<thead>
261261
{reactTable.getHeaderGroups().map((headerGroup) => (
262-
<tr key={headerGroup.id} className="text-grey-50 border-grey-90 h-10 text-left">
262+
<tr
263+
key={headerGroup.id}
264+
className="text-grey-50 border-grey-90 bg-grey-100 sticky top-0 z-20 h-10 text-left"
265+
>
263266
<th
264267
className={clsx(
265268
'border-grey-90 bg-grey-100 sticky left-0 z-10 h-full border-y border-r p-2 font-normal',

0 commit comments

Comments
 (0)