|
1 | 1 | <template> |
2 | 2 | <div> |
3 | 3 | <DataTable :value="summaryTable" tableStyle="min-width: 50rem; margin: 10px 10px;" scrollable scrollHeight="800px" |
4 | | - showGridlines selectionMode="single" v-model:selection="selectedPkg"> |
5 | | - <!-- <template #header> --> |
6 | | - <!-- <div style="text-align:left"> --> |
7 | | - <!-- <MultiSelect :modelValue="selectedColumns" :options="columns" optionLabel="header" @update:modelValue="onToggle" --> |
8 | | - <!-- display="chip" placeholder="Select Columns" /> --> |
9 | | - <!-- </div> --> |
10 | | - <!-- </template> --> |
| 4 | + showGridlines selectionMode="single" v-model:selection="selectedPkg" v-model:filters="filters" |
| 5 | + :globalFilterFields="['user', 'repo', 'pkg', 'description', 'categories', 'os_categories']"> |
| 6 | + |
| 7 | + <template #header> |
| 8 | + <div style="display: flex; justify-content: center"> |
| 9 | + <div style="width: 50%"> |
| 10 | + <IconField> |
| 11 | + <InputIcon> |
| 12 | + <i class="pi pi-search" /> |
| 13 | + </InputIcon> |
| 14 | + <InputText style="width: 100%" v-model="filters['global'].value" placeholder="Global Search" /> |
| 15 | + </IconField> |
| 16 | + </div> |
| 17 | + </div> |
| 18 | + </template> |
| 19 | + |
11 | 20 | <Column frozen field="idx" header="Idx" /> |
12 | 21 | <Column frozen field="user" header="User" style="min-width: 150px;" /> |
13 | 22 | <Column frozen field="repo" header="Repo" style="min-width: 180px;" /> |
|
92 | 101 |
|
93 | 102 | <script setup lang="ts"> |
94 | 103 | import type { Pkg, PkgInfo, Test } from '~/shared/info'; |
| 104 | +import { FilterMatchMode } from '@primevue/core/api'; |
| 105 | +
|
| 106 | +// interactive filter/search inputs |
| 107 | +const filters = ref<any>({ |
| 108 | + global: { value: null, matchMode: FilterMatchMode.CONTAINS }, |
| 109 | +}); |
95 | 110 |
|
96 | 111 | const summaries = ref<PkgInfo[]>([]); |
97 | 112 |
|
@@ -167,6 +182,8 @@ const summaryTable = computed(() => { |
167 | 182 | }); |
168 | 183 | }); |
169 | 184 |
|
| 185 | +
|
| 186 | +
|
170 | 187 | const dialogShow = ref(false); |
171 | 188 | const dialogHeader = ref<{ repo: string, repo_url: string, pkg_name: string, pkg: Pkg } | null>(); |
172 | 189 | const testCases = ref<Test[]>([]); |
|
0 commit comments