Skip to content
Snippets Groups Projects
Commit 82249d15 authored by Simon Malesys's avatar Simon Malesys
Browse files

Quick fix the motif filter chip

parent 2646511d
No related branches found
No related tags found
1 merge request!8Merge modifications asked by reviewers
Pipeline #142427 passed
......@@ -219,6 +219,10 @@ const allFilters = computed(() => {
filterChips.push(['lightSegments', value])
})
if (filters.value.motif) {
filterChips.push(['motif', filters.value.motif])
}
return filterChips
})
......@@ -274,8 +278,13 @@ function allSelected(filter: keyof AdvancedFilters, valuesNumber: number): boole
* @param filterChip - The data of the filter chip to remove
*/
function removeFilter(filterChip: FilterChip): void {
const valueIndex: number = filters.value[filterChip[0]].indexOf(filterChip[1])
filters.value[filterChip[0]].splice(valueIndex, 1)
if (filterChip[0] === 'motif') {
filters.value[filterChip[0]] = ''
} else {
const valueIndex: number = filters.value[filterChip[0]].indexOf(filterChip[1])
filters.value[filterChip[0]].splice(valueIndex, 1)
}
emit('filtersUpdate', filters.value)
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment