Skip to content

Commit

Permalink
fix: codec dialog filter
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnth committed Oct 22, 2024
1 parent fdf2567 commit ea6b1ac
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/components/Codec/CodecDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Column from "primevue/column";
import InputText from "primevue/inputtext";
import type { DynamicDialogInstance } from "primevue/dynamicdialogoptions";
import DataTable from "primevue/datatable";
import { FilterMatchMode } from "@primevue/core/api";
provide(THEME_KEY, useDark().value ? darkTheme : lightTheme);
Expand Down Expand Up @@ -124,7 +125,9 @@ const exportCSV = () => {
dt.value.exportCSV();
};
const filter = ref();
const filters = ref({
id: { value: null, matchMode: FilterMatchMode.EQUALS },
});
</script>
<template>
<ComponentContainer spaced internal>
Expand Down Expand Up @@ -152,7 +155,7 @@ const filter = ref();
<template #end>
<IconField>
<InputIcon class="pi pi-search" />
<InputText v-model="filter" placeholder="Search" />
<InputText v-model="filters['id'].value" placeholder="Search" />
</IconField>
</template>
</Toolbar>
Expand All @@ -164,10 +167,11 @@ const filter = ref();
<DataTable
ref="dt"
:value="datatableNodes"
resizableColumns
columnResizeMode="expand"
sortField="quantity"
:sortOrder="-1"
v-model:filters="filters"
resizable-columns
column-resize-mode="expand"
sort-field="quantity"
:sort-order="-1"
>
<Column field="id" header="Character" sortable></Column>
<Column field="quantity" header="Quantity" sortable></Column>
Expand Down

0 comments on commit ea6b1ac

Please sign in to comment.