diff --git a/src/lib/components/filters/content.svelte b/src/lib/components/filters/content.svelte index c9f77e498..bb77b81b0 100644 --- a/src/lib/components/filters/content.svelte +++ b/src/lib/components/filters/content.svelte @@ -8,8 +8,8 @@ InputSelectCheckbox, InputDateTime } from '$lib/elements/forms'; - import { createEventDispatcher, onMount } from 'svelte'; - import { operators, addFilter, queries, type TagValue } from './store'; + import { onMount } from 'svelte'; + import { operators, addFilter, queries, tags } from './store'; import type { Column } from '$lib/helpers/types'; import type { Writable } from 'svelte/store'; import { TagList } from '.'; @@ -35,15 +35,8 @@ })); $: operator = operatorKey ? operators[operatorKey] : null; - $: { - columnId; - operatorKey = null; - } - $: isDisabled = !operator; - let localTags: TagValue[] = []; - onMount(() => { value = column?.array ? [] : null; if (column?.type === 'datetime') { @@ -62,12 +55,6 @@ queries.apply(); } } - - const dispatch = createEventDispatcher<{ - clear: void; - apply: { applied: number }; - }>(); - dispatch('apply', { applied: localTags.length });
@@ -151,10 +138,10 @@ {/if} - {#if !singleCondition} + {#if !singleCondition && $tags.length > 0}