From d3f46c09cc3f122b4f04b9794b71f72d15c4af23 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 12 Apr 2026 20:53:02 +0300 Subject: [PATCH] Fix GlobalSearch flickering wrong search when filter changed --- app/components/layout/GlobalSearch.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/layout/GlobalSearch.tsx b/app/components/layout/GlobalSearch.tsx index 8a0fdf877..ccd599cf0 100644 --- a/app/components/layout/GlobalSearch.tsx +++ b/app/components/layout/GlobalSearch.tsx @@ -234,7 +234,9 @@ function GlobalSearchContent({ ); const hasQuery = query.length >= 3; - const results = hasQuery ? (fetcher.data?.results ?? []) : []; + const fetchedType = fetcher.data?.type ?? null; + const results = + hasQuery && fetchedType === searchType ? (fetcher.data?.results ?? []) : []; const weaponResults = searchType === "weapons" && hasQuery ? filterWeaponResults(query, t) : [];