fix(GitRemoteBranchSelect): update fetcher key to use deferred URL value (#8905)

This commit is contained in:
James Gatz
2025-07-24 15:20:06 +02:00
committed by Curry Yang
parent b7d095596c
commit d25516056c

View File

@@ -14,11 +14,11 @@ export const GitRemoteBranchSelect = ({
isDisabled: boolean;
credentials: GitCredentials;
}) => {
const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: url || 'branch-select' });
const uri = useDeferredValue(url);
const remoteBranchesFetcher = useFetcher<{ branches: string[] }>({ key: `branch-select:${uri}` });
const { organizationId } = useParams<{ organizationId: string }>();
const isLoadingRemoteBranches = remoteBranchesFetcher.state !== 'idle';
const uri = useDeferredValue(url);
useEffect(() => {
if (uri && remoteBranchesFetcher.state === 'idle' && !remoteBranchesFetcher.data) {