Skip to content

Commit

Permalink
Add filters select functionality on playground
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarodE committed May 9, 2024
1 parent 655e351 commit 02b8b69
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
<h3>{{ facet.label }}</h3>
<ul>
<li v-for="filter in facet.filters" :key="filter.id">
{{ filter.label }}
<BaseEventButton :events="{ UserClickedAFilter: filter }">
{{ filter.label }}
<span v-if="filter.selected">✅</span>
</BaseEventButton>
</li>
</ul>
</template>
Expand All @@ -31,6 +34,7 @@
</template>

<script setup lang="ts">
import BaseEventButton from '../../../../../x-components/src/components/base-event-button.vue';
import ClearFilters from '../../../../../x-components/src/x-modules/facets/components/clear-filters.vue';
import Facets from '../../../../../x-components/src/x-modules/facets/components/facets/facets.vue';
import SelectedFilters from '../../../../../x-components/src/x-modules/facets/components/lists/selected-filters.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FacetsXModule } from '../../../../x-components/src/x-modules/facets/x-m
const facets: Record<Facet['id'], Facet> = {
gender: createSimpleFacetStub('gender', createFilter => [
createFilter('Men', false),
createFilter('Women', true)
createFilter('Women', false)
]),
brand: createSimpleFacetStub('brand', createFilter => [
createFilter('Audi', true),
Expand Down

0 comments on commit 02b8b69

Please sign in to comment.