From 6717a8b2f3a5c2577f5512713381c4b5840bd48a Mon Sep 17 00:00:00 2001 From: Mau Zsofia Abraham Date: Wed, 2 Oct 2024 17:07:06 +0200 Subject: [PATCH] Require filter function for now --- components/explore-samples-form-window-content.vue | 1 + components/ui/tags-select.vue | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/components/explore-samples-form-window-content.vue b/components/explore-samples-form-window-content.vue index 29665b2..9ff76b2 100644 --- a/components/explore-samples-form-window-content.vue +++ b/components/explore-samples-form-window-content.vue @@ -259,6 +259,7 @@ const openSearchResultsWindow = function () { diff --git a/components/ui/tags-select.vue b/components/ui/tags-select.vue index 6377a74..d74d909 100644 --- a/components/ui/tags-select.vue +++ b/components/ui/tags-select.vue @@ -26,7 +26,7 @@ interface Tag { interface Props { options: Array; placeholder: string; - filterFunction?: (list: Array, searchTerm: string) => Array; + filterFunction: (list: Array, searchTerm: string) => Array; } const props = defineProps(); @@ -34,14 +34,6 @@ const { options, placeholder, filterFunction } = toRefs(props); const searchTerm = ref(""); const model = defineModel>(); const open = ref(false); -const filter = computed(() => { - return ( - filterFunction.value ?? - function (list: Array, searchTerm: string) { - return list.filter((value) => value === searchTerm); - } - ); -}); watch( model, () => { @@ -58,7 +50,7 @@ watch( v-model:open="open" v-model:search-term="searchTerm" class="mx-auto w-full" - :filter-function="filter" + :filter-function="filterFunction" multiple >