Skip to content
Snippets Groups Projects
Commit e7eb7c4d authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix(ShowSelector): use proper search function

We already have a proper search implementation that we should use for
in-app filtering.
parent c42f6602
No related branches found
No related tags found
No related merge requests found
Pipeline #8362 passed
...@@ -51,7 +51,7 @@ import { sort } from 'fast-sort' ...@@ -51,7 +51,7 @@ import { sort } from 'fast-sort'
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { useI18n } from '@/i18n' import { useI18n } from '@/i18n'
import { sanitizeHTML } from '@/util' import { matchesSearch, sanitizeHTML } from '@/util'
import { useAuthStore, useShowStore } from '@/stores' import { useAuthStore, useShowStore } from '@/stores'
import ComboBox from '@/components/ComboBox.vue' import ComboBox from '@/components/ComboBox.vue'
import SafeHTML from '@/components/generic/SafeHTML' import SafeHTML from '@/components/generic/SafeHTML'
...@@ -95,7 +95,7 @@ const filteredShows = computed(() => { ...@@ -95,7 +95,7 @@ const filteredShows = computed(() => {
) )
.filter( .filter(
(show) => (show) =>
sanitizeHTML(show.name).toLocaleLowerCase().includes(showSearchQuery.value) || matchesSearch(sanitizeHTML(show.name), showSearchQuery.value) ||
show.id.toString() === showSearchQuery.value, show.id.toString() === showSearchQuery.value,
) )
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment