diff --git a/src/lib/components/filters/filters.svelte b/src/lib/components/filters/filters.svelte index 13a41526c..ec7ba4cdf 100644 --- a/src/lib/components/filters/filters.svelte +++ b/src/lib/components/filters/filters.svelte @@ -44,12 +44,12 @@ let showFiltersDesktop = false; let showFiltersMobile = false; - let applied = $tags.length; + $: filtersAppliedCount = $tags.length; beforeNavigate(() => { - applied = $tags.length; showFiltersDesktop = false; showFiltersMobile = false; + filtersAppliedCount = $tags.length; }); function clearAll() { @@ -87,7 +87,7 @@ applied: number; }> ) { - applied = e.detail.applied; + filtersAppliedCount = e.detail.applied; if (singleCondition) { showFiltersDesktop = false; showFiltersMobile = false; @@ -135,8 +135,8 @@ {#if !onlyIcon} Filters - {#if applied > 0} - + {#if filtersAppliedCount > 0} + {/if} {:else} - {#if applied > 0} - + {#if filtersAppliedCount > 0} + {/if} {/if} @@ -167,7 +167,7 @@ {columns} {singleCondition} on:apply={afterApply} - on:clear={() => (applied = 0)} /> + on:clear={() => (filtersAppliedCount = 0)} /> {/if}
Clear all @@ -209,10 +209,8 @@ @@ -230,7 +228,7 @@ bind:arrayValues {singleCondition} on:apply={afterApply} - on:clear={() => (applied = 0)} /> + on:clear={() => (filtersAppliedCount = 0)} /> {/if}