Skip to content

Commit

Permalink
fix: search filters by category
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviareichl committed Aug 12, 2024
1 parent b123f3c commit 476a039
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/data-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const entities = computed(() => {
<template>
<div class="container relative grid grid-rows-[auto_1fr] gap-4 p-8">
<SearchForm
:filter="searchFilters.category"
:category="searchFilters.category"
:search="searchFilters.search"
@submit="onChangeSearchFilters"
/>
Expand Down
4 changes: 2 additions & 2 deletions components/search-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { categories, type Category } from "@/composables/use-get-search-results"
export interface SearchFormData {
search: string;
filter: Category;
category: Category;
}
const props = defineProps<SearchFormData>();
Expand All @@ -22,7 +22,7 @@ function onSubmit(event: Event) {
emit("submit", {
search: formData.get("q") as string,
filter: formData.get("category") as Category,
category: formData.get("category") as Category,
});
}
Expand Down

0 comments on commit 476a039

Please sign in to comment.