feat(logs): sticky table thead

This commit is contained in:
kunish 2023-09-05 00:20:19 +08:00
parent c9f696597e
commit 5affd5b91e
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
2 changed files with 7 additions and 7 deletions

View File

@ -237,7 +237,7 @@ export default () => {
})
return (
<div class="flex h-full flex-col gap-4 overflow-y-auto">
<div class="flex h-full flex-col gap-4 overflow-y-auto p-1">
<div class="flex w-full items-center gap-2">
<input
class="input input-primary flex-1"

View File

@ -67,16 +67,16 @@ export default () => {
})
return (
<div class="flex flex-col gap-4">
<div class="flex h-full flex-col gap-4 overflow-y-auto p-1">
<input
class="input input-primary"
class="input input-primary flex-shrink-0"
placeholder={t('search')}
onInput={(e) => setSearch(e.target.value)}
/>
<div class="overflow-x-auto whitespace-nowrap rounded-md">
<table class="table table-zebra-zebra table-xs rounded-none bg-base-200">
<thead>
<div class="overflow-x-auto whitespace-nowrap rounded-md bg-base-300">
<table class="table table-xs relative rounded-none">
<thead class="sticky top-0 z-10">
<For each={table.getHeaderGroups()}>
{(headerGroup) => (
<tr>
@ -102,7 +102,7 @@ export default () => {
<tbody>
<For each={table.getRowModel().rows}>
{(row) => (
<tr>
<tr class="hover">
<For each={row.getVisibleCells()}>
{(cell) => (
<td>