style: to keep table header within sight when browsing many records, make it sticky

Being frankly, I'm quite a stranger to zenui, please forgive me that I write an inline style and it will be helpful to instruct me on if there is a possibly formal way to do it.
This commit is contained in:
Kamas "Iceberg" Lau 2025-12-01 17:08:23 +08:00 committed by GitHub
parent a19b92a5cb
commit 7598092193
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,7 @@ export function MetricsExpandedTable({
<Column overflow="auto" minHeight="0" height="100%" paddingRight="3"> <Column overflow="auto" minHeight="0" height="100%" paddingRight="3">
{items && ( {items && (
<DataTable data={items}> <DataTable data={items}>
<DataColumn id="label" label={title} width="minmax(200px, 2fr)" align="start"> <DataColumn id="label" label={title} width="minmax(200px, 2fr)" align="start" style="position:sticky;top:0;background-color:#0f0f0f">
{row => ( {row => (
<Row overflow="hidden"> <Row overflow="hidden">
<MetricLabel type={type} data={row} /> <MetricLabel type={type} data={row} />