Skip to content

Commit

Permalink
feat(renderless-filter): allowing to use data-test
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcg88 committed Jul 25, 2024
1 parent 0265afd commit 061a59f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/x-components/src/views/home/aside.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</span>
</SelectedFilters>
<FiltersList v-slot="{ filter }">
<SimpleFilter #label :filter="filter">
<SimpleFilter #label :filter="filter" :data-test="`${facet.label}-filter`">
<BasePriceFilterLabel
v-if="facet.id === 'price'"
:filter="filter"
Expand Down Expand Up @@ -107,7 +107,11 @@
filter
}"
>
<SimpleFilter #label="{ filter }" :filter="filter">
<SimpleFilter
#label="{ filter }"
:filter="filter"
:data-test="`${facet.label}-filter`"
>
{{ filter.label }}
<span :data-test="`${facet.label}-filter-total-results`">
{{ filter.totalResults }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
export default defineComponent({
name: 'RenderlessFilter',
xModule: facetsXModule.name,
inheritAttrs: false,
props: {
/** The filter data to render. */
filter: {
Expand Down

0 comments on commit 061a59f

Please sign in to comment.