π OpenHands: AI-Driven Development
[Bug]: Prevent selection of "add more repo" option in dropdown (#5688)
Rohit Malhotra3876f4a59cb8
diff --git a/frontend/src/components/features/github/github-repo-selector.tsx b/frontend/src/components/features/github/github-repo-selector.tsxindex dd645c892f..4352fd9b42 100644--- a/frontend/src/components/features/github/github-repo-selector.tsx+++ b/frontend/src/components/features/github/github-repo-selector.tsx@@ -1,3 +1,4 @@+import React from "react";import { Autocomplete, AutocompleteItem } from "@nextui-org/react";import { useDispatch } from "react-redux";import posthog from "posthog-js";@@ -14,6 +15,7 @@ export function GitHubRepositorySelector({repositories,}: GitHubRepositorySelectorProps) {const { data: config } = useConfig();+ const [selectedKey, setSelectedKey] = React.useState<string | null>(null);// Add option to install app onto more reposconst finalRepositories =@@ -36,6 +38,7 @@ export function GitHubRepositorySelector({dispatch(setSelectedRepository(repo.full_name));posthog.capture("repository_selected");onSelect();+ setSelectedKey(id);}};@@ -63,6 +66,7 @@ export function GitHubRepositorySelector({name="repo"aria-label="GitHub Repository"placeholder="Select a GitHub project"+ selectedKey={selectedKey}inputProps={{classNames: {inputWrapper: