From 2f7103f5f388a37129e6e2c3e2009c1a4252dc3b Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Tue, 3 Jun 2025 19:16:44 -0400 Subject: [PATCH] fix: clear album selection when switching search categories in ImmichSelect --- frontend/src/lib/components/ImmichSelect.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/ImmichSelect.svelte b/frontend/src/lib/components/ImmichSelect.svelte index 7ee23c2..e2ae2fd 100644 --- a/frontend/src/lib/components/ImmichSelect.svelte +++ b/frontend/src/lib/components/ImmichSelect.svelte @@ -31,11 +31,21 @@ } $: { - if (currentAlbum) { + if (searchCategory === 'album' && currentAlbum) { immichImages = []; fetchAlbumAssets(currentAlbum); } else if (searchCategory === 'date' && selectedDate) { + // Clear album selection when switching to date mode + if (currentAlbum) { + currentAlbum = ''; + } searchImmich(); + } else if (searchCategory === 'search') { + // Clear album selection when switching to search mode + if (currentAlbum) { + currentAlbum = ''; + } + // Search will be triggered by the form submission or debounced search } }