Show column sort order.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Madeorsk 2024-07-27 18:56:10 +02:00
parent e71d0aa446
commit a82da6541d
Signed by: Madeorsk
SSH key fingerprint: SHA256:J9G0ofIOLKf7kyS2IfrMqtMaPdfsk1W02+oGueZzDDU
2 changed files with 19 additions and 0 deletions

View file

@ -146,6 +146,8 @@ export function ColumnHeading()
<th className={sortState?.type ?? undefined} data-sort-order={sortState?.order ?? undefined} <th className={sortState?.type ?? undefined} data-sort-order={sortState?.order ?? undefined}
onMouseDown={handleClick} onContextMenu={disableContextMenu}> onMouseDown={handleClick} onContextMenu={disableContextMenu}>
{column.title} {column.title}
{sortState?.order && <span className={"order"}>{sortState.order}</span>}
</th> </th>
); );
} }

View file

@ -60,5 +60,22 @@ tr.headings
{ {
bottom: 0.5em; bottom: 0.5em;
} }
.order
{ // Sort order indicator.
position: relative;
top: 0;
bottom: 0;
display: block;
margin: auto 0;
padding: 0.3em 0.3em 0;
align-items: center;
justify-content: center;
color: var(--foreground-lightest);
font-size: 0.7em;
float: right;
}
} }
} }