Skip to content

Commit

Permalink
fix: use sort and slice functions to sort topics instead of toSorted(…
Browse files Browse the repository at this point in the history
…) for better browser support
  • Loading branch information
oliviareichl committed Oct 10, 2024
1 parent f204ad1 commit 8cd7f57
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions components/search-filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function toggleShowMore() {
const sortedTopics = computed(() => {
if (props.facets?.topic == null) return null;
const sorted = props.facets.topic.toSorted((a, b) => {
const sorted = props.facets.topic.slice().sort((a, b) => {
return Number(b.count) - Number(a.count);
});
Expand Down Expand Up @@ -236,9 +236,6 @@ const sliderValue = ref([slider.min, slider.max]);
</div>
<div class="pb-4">
<Accordion type="single" collapsible default-value="year">
<div class="grid grid-cols-2 py-3 text-sm font-normal">
<div class="flex w-full flex-col"></div>
</div>
<AccordionItem value="year">
<AccordionTrigger>
<div class="text-lg">Erscheinungsjahr</div>
Expand All @@ -264,9 +261,6 @@ const sliderValue = ref([slider.min, slider.max]);
</div>
<div class="pb-4">
<Accordion type="single" collapsible default-value="language">
<div class="grid grid-cols-2 py-3 text-sm font-normal">
<div class="flex w-full flex-col"></div>
</div>
<AccordionItem value="language">
<AccordionTrigger>
<div class="text-lg">Sprache</div>
Expand Down Expand Up @@ -311,9 +305,6 @@ const sliderValue = ref([slider.min, slider.max]);
</div>
<div class="pb-4">
<Accordion type="single" collapsible default-value="topic">
<div class="grid grid-cols-2 py-3 text-sm font-normal">
<div class="flex w-full flex-col"></div>
</div>
<AccordionItem value="topic">
<AccordionTrigger>
<div class="text-lg">Thema</div>
Expand Down

0 comments on commit 8cd7f57

Please sign in to comment.