From b91285fe24a7f7f96d3a2ea2f3601a202e69b00c Mon Sep 17 00:00:00 2001
From: nijmra
Date: Tue, 15 Oct 2024 10:58:08 +0200
Subject: [PATCH] feat: add to history
---
.../src/components/DateRangePicker.vue | 9 +++----
.../publicatie/PublicatiesOverview.vue | 6 +++--
.../composables/use-paged-search.ts | 24 +++++++++----------
3 files changed, 18 insertions(+), 21 deletions(-)
diff --git a/odpc.client/src/components/DateRangePicker.vue b/odpc.client/src/components/DateRangePicker.vue
index c8442a6..f7cabfd 100644
--- a/odpc.client/src/components/DateRangePicker.vue
+++ b/odpc.client/src/components/DateRangePicker.vue
@@ -8,7 +8,7 @@
id="fromDate"
ref="fromDateRef"
v-model="fromDateModel"
- @change="onFromDateChange"
+ @change="$emit('update:fromDate', fromDateModel)"
:max="today"
/>
@@ -21,7 +21,7 @@
id="untilDate"
ref="untilDateRef"
v-model="untilDateModel"
- @change="onUntilDateChange"
+ @change="$emit('update:untilDate', untilDateModel)"
:max="today"
/>
@@ -33,7 +33,7 @@ import { ref, watch } from "vue";
const props = defineProps<{ fromDate: string; untilDate: string }>();
-const emit = defineEmits<{
+defineEmits<{
(e: "update:fromDate", payload: string): void;
(e: "update:untilDate", payload: string): void;
}>();
@@ -51,9 +51,6 @@ watch(
}
);
-const onFromDateChange = () => emit("update:fromDate", fromDateModel.value);
-const onUntilDateChange = () => emit("update:untilDate", untilDateModel.value);
-
const fromDateRef = ref();
const untilDateRef = ref();
diff --git a/odpc.client/src/features/publicatie/PublicatiesOverview.vue b/odpc.client/src/features/publicatie/PublicatiesOverview.vue
index 5beb34f..bcdead6 100644
--- a/odpc.client/src/features/publicatie/PublicatiesOverview.vue
+++ b/odpc.client/src/features/publicatie/PublicatiesOverview.vue
@@ -4,7 +4,7 @@