From 1e88134c507971d991c714e639c888d66d88a1bb Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Tue, 17 Dec 2024 16:35:29 +0000 Subject: [PATCH] Fix unintended animation --- src/components/ProgressGuide/FollowDialog.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ProgressGuide/FollowDialog.tsx b/src/components/ProgressGuide/FollowDialog.tsx index 54772e08d9..b5a3823f7c 100644 --- a/src/components/ProgressGuide/FollowDialog.tsx +++ b/src/components/ProgressGuide/FollowDialog.tsx @@ -138,6 +138,7 @@ function DialogInner({ Map >(() => new Map()) + const query = searchText || selectedInterest const { data: searchResults, isFetching, @@ -147,7 +148,7 @@ function DialogInner({ isFetchingNextPage, fetchNextPage, } = useActorSearchPaginated({ - query: searchText || selectedInterest, + query, }) const hasSearchText = !!searchText @@ -181,7 +182,8 @@ function DialogInner({ seen.add(profile.did) _items.push({ type: 'profile', - key: profile.did, + // Don't share identity across tabs or typing attempts + key: query + ':' + profile.did, profile, isSuggestion: false, }) @@ -234,6 +236,7 @@ function DialogInner({ hasSearchText, selectedInterest, suggestedAccounts, + query, ]) if (searchText && !isFetching && !items.length && !isError) { @@ -246,7 +249,6 @@ function DialogInner({ case 'profile': { return (