Components
<AisClearRefinements>
Clear refinements widget
Usage
MySearchExperience.vue
<template>
<div>
<AisInstantSearch :widgets :configuration>
<AisClearRefinements />
<!-- Or, use with an identifier: -->
<!-- <AisClearRefinements id="all" /> -->
<AisClearRefinements id="shipping">
<template #default="{ canRefine, refine, createURL }">
Clear refinements
</template>
</AisClearRefinements>
</AisInstantSearch>
</div>
</template>
<script setup lang="ts">
const widgets = computed(() => [
useAisClearRefinements({}),
// Or, use with an identifier: useAisClearRefinements({}, "all")
useAisClearRefinements(
{
includedAttributes: ["free_shipping"],
// excludedAttributes: ['...']
},
"shipping"
),
]);
</script>
⚠️ Always setting ID to widget and component's prop if you use more ClearRefinements components inside the same index
⚠️ This component does not allow the simultaneous use of the included-attributes and excluded-attributes props
Slots, props and widget connector params are all typed! More thorough documentation coming soon :)