Add emit("search") when search is run in SearchInput
authorAdam Dullage <redacted>
Sat, 4 May 2024 10:45:44 +0000 (11:45 +0100)
committerAdam Dullage <redacted>
Sat, 4 May 2024 10:45:44 +0000 (11:45 +0100)
client/partials/SearchInput.vue

index 408798bf29ce46006565b8f11315d18b3ce1f6aa..abf050644a251defddb082a5cd77689b1ad75c91 100644 (file)
@@ -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));
   }
git clone https://git.99rst.org/PROJECT