From: Adam Dullage Date: Sat, 4 May 2024 10:45:44 +0000 (+0100) Subject: Add emit("search") when search is run in SearchInput X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=18189231e119add4e6e54278c3954d196b6aa484;p=flatnotes.git Add emit("search") when search is run in SearchInput --- diff --git a/client/partials/SearchInput.vue b/client/partials/SearchInput.vue index 408798b..abf0506 100644 --- a/client/partials/SearchInput.vue +++ b/client/partials/SearchInput.vue @@ -25,6 +25,7 @@ import TextInput from "../components/TextInput.vue"; import { getToastOptions } from "../helpers.js"; const props = defineProps({ initialSearchTerm: String }); +const emit = defineEmits(["search"]); const router = useRouter(); const searchTerm = ref(props.initialSearchTerm); @@ -36,6 +37,7 @@ function search() { name: "search", query: { [constants.params.searchTerm]: searchTerm.value }, }); + emit("search"); } else { toast.add(getToastOptions("Error", "Please enter a search term.", true)); }