Skip to content

Commit 42c2fc5

Browse files
committed
ui: make datatable scrollable and occupy the whole page
1 parent 86c2b37 commit 42c2fc5

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

ui/app/assets/css/main.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
html, body {
3+
margin: 0;
4+
padding: 0;
5+
overflow: hidden; /* forbid scrolling */
6+
}
7+

ui/app/assets/css/tailwind.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "tailwindcss";
22
@import "tailwindcss-primeui";
33

4-
@custom-variant dark (&:where(.my-app-dark, .my-app-dark *)); //dark mode configuration
4+
/* dark mode configuration */
5+
@custom-variant dark (&:where(.my-app-dark, .my-app-dark *));

ui/app/components/Kani.vue

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ import { URL_MERGE_DIFF, MergeKaniColumns, multiSort, type VecMergeHashKaniList,
44
import { useStyleStore } from "~/stores/style";
55
66
const { viewportHeight } = storeToRefs(useStyleStore());
7-
const colStyle = (ratio: number) => {
8-
const style = {
9-
"width": `${Math.round(viewportHeight.value * ratio)}px`,
10-
"white-space": "normal", "word-break": "break-word",
11-
};
12-
console.log(style);
13-
return style;
14-
};
157
168
const raw = ref<VecMergeHashKaniList>([]);
179
// Download JSON
@@ -37,8 +29,9 @@ useHead({ title: "Verify Rust Std - Kani" });
3729

3830
<template>
3931
<DataTable :value="raw" paginator :rows="5" :rowsPerPageOptions="[5, 10, 20, 50]" sortMode="multiple" removableSort
40-
v-model:multi-sort-meta="multiSort" stripedRows tableStyle="min-width: 20rem" v-model:filters="filters"
41-
:globalFilterFields="FILTERS.fields" currentPageReportTemplate="{first} to {last} of {totalRecords}">
32+
v-model:multi-sort-meta="multiSort" stripedRows tableStyle="min-width: 20rem" tableClass="m-2"
33+
:scrollHeight="`${(viewportHeight - 100) * 0.8}px`" v-model:filters="filters" :globalFilterFields="FILTERS.fields"
34+
currentPageReportTemplate="{first} to {last} of {totalRecords}">
4235

4336
<template #header>
4437
<div class="flex justify-between items-center">

ui/nuxt.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default defineNuxtConfig({
55
compatibilityDate: '2025-07-15',
66
devtools: { enabled: true },
77
ssr: false, // Client-side Only Rendering (SPA)
8-
css: ["primeicons/primeicons.css"],
8+
css: ["primeicons/primeicons.css", "~/assets/css/main.css"],
99
typescript: { typeCheck: true },
1010
modules: [
1111
'@primevue/nuxt-module',
@@ -20,4 +20,4 @@ export default defineNuxtConfig({
2020
}
2121
}
2222
}
23-
})
23+
})

0 commit comments

Comments
 (0)