fix: Show DefaultFiltersSelector for global toggleable filters (#123) (#20066)

Co-authored-by: Tim Baek <tim@openwebui.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Classic298
2025-12-21 10:50:36 +01:00
committed by GitHub
parent 90c0c5da00
commit 0b0962a2ae

View File

@@ -727,22 +727,20 @@
/>
</div>
{#if filterIds.length > 0}
{@const toggleableFilters = ($functions ?? []).filter(
(func) =>
func.type === 'filter' &&
(filterIds.includes(func.id) || func?.is_global) &&
func?.meta?.toggle
)}
{@const toggleableFilters = $functions.filter(
(func) =>
func.type === 'filter' &&
(filterIds.includes(func.id) || func?.is_global) &&
func?.meta?.toggle
)}
{#if toggleableFilters.length > 0}
<div class="my-2">
<DefaultFiltersSelector
bind:selectedFilterIds={defaultFilterIds}
filters={toggleableFilters}
/>
</div>
{/if}
{#if toggleableFilters.length > 0}
<div class="my-2">
<DefaultFiltersSelector
bind:selectedFilterIds={defaultFilterIds}
filters={toggleableFilters}
/>
</div>
{/if}
{/if}