From 7241789c9e7f06965649c400e40c6885ba20f3aa Mon Sep 17 00:00:00 2001 From: padreug Date: Fri, 8 Aug 2025 15:23:23 +0200 Subject: [PATCH] refactor: Update FuzzySearch component and composable for improved class handling and code clarity - Modify the class prop in FuzzySearch.vue to accept both string and array types for greater flexibility. - Adjust the template to correctly reference props.class for consistent styling. - Remove unused variables in FuzzySearchDemo.vue to streamline the code. - Update the updateData function in useFuzzySearch.ts for better parameter clarity. --- src/components/ui/fuzzy-search/FuzzySearch.vue | 5 ++--- src/components/ui/fuzzy-search/FuzzySearchDemo.vue | 3 +-- src/composables/useFuzzySearch.ts | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/ui/fuzzy-search/FuzzySearch.vue b/src/components/ui/fuzzy-search/FuzzySearch.vue index 5de762b..871195d 100644 --- a/src/components/ui/fuzzy-search/FuzzySearch.vue +++ b/src/components/ui/fuzzy-search/FuzzySearch.vue @@ -29,7 +29,7 @@ interface Props { /** * Custom class for the search container */ - class?: string + class?: string | string[] /** * Whether the search input should be disabled */ @@ -58,7 +58,6 @@ const dataRef = computed(() => props.data) // Use the fuzzy search composable const { searchQuery, - results, filteredItems, isSearching, resultCount, @@ -90,7 +89,7 @@ watch(filteredItems, (items) => {