Skip to content

Commit

Permalink
fix: use translated name property for listing properties filter label
Browse files Browse the repository at this point in the history
  • Loading branch information
patzick committed Jan 25, 2023
1 parent 8a7dab1 commit deaf9d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/wild-lemons-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"vue-demo-store": patch
"@shopware-pwa/cms-base": patch
---

use translated name property for listing filter label
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { ListingFilter } from "@shopware-pwa/types";
import { inject, ref } from "vue";
import { getTranslatedProperty } from "@shopware-pwa/helpers-next";
defineProps<{
filter: ListingFilter;
Expand Down Expand Up @@ -91,7 +92,7 @@ onClickOutside(dropdownElement, () => (isFilterVisible.value = false));
class="h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"
/>
<div>
{{ option.name }}
{{ getTranslatedProperty(option, 'name') }}
</div>
</label>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { ListingFilter } from "@shopware-pwa/types";
import { getTranslatedProperty } from "@shopware-pwa/helpers-next";
const { getCurrentFilters } = useListing({
listingType: "productSearchListing",
Expand Down Expand Up @@ -78,7 +79,7 @@ onClickOutside(dropdownElement, () => (isOpen.value = false));
:for="`filter-mobile-${filter.code}-${option.id}`"
class="ml-3 min-w-0 flex-1 text-gray-500"
>
{{ option.name }}
{{ getTranslatedProperty(option, 'name') }}
</label>
</div>
</div>
Expand Down

0 comments on commit deaf9d1

Please sign in to comment.