From f608e51ebd42a898146c97e3b0e8a88f347757f8 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Thu, 18 Jul 2024 09:53:00 +0200 Subject: [PATCH] remote select --- libs/remix-ui/git/src/components/panels/remotes.tsx | 2 +- libs/remix-ui/git/src/components/panels/remoteselect.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/git/src/components/panels/remotes.tsx b/libs/remix-ui/git/src/components/panels/remotes.tsx index 59cc824a17..fba1b46873 100644 --- a/libs/remix-ui/git/src/components/panels/remotes.tsx +++ b/libs/remix-ui/git/src/components/panels/remotes.tsx @@ -33,7 +33,7 @@ export const Remotes = () => { {context.remotes && context.remotes.map((remote, index) => { return ( - + ); })} :
diff --git a/libs/remix-ui/git/src/components/panels/remoteselect.tsx b/libs/remix-ui/git/src/components/panels/remoteselect.tsx index 1752c72c03..bd554f70ca 100644 --- a/libs/remix-ui/git/src/components/panels/remoteselect.tsx +++ b/libs/remix-ui/git/src/components/panels/remoteselect.tsx @@ -17,14 +17,18 @@ export interface RemoteSelectProps { } export const Remoteselect = (props: RemoteSelectProps) => { - const { remote } = props; + const { remote, openDefault } = props; const context = React.useContext(gitPluginContext) const actions = React.useContext(gitActionsContext) const [activePanel, setActivePanel] = useState(""); + useEffect(() => { + setActivePanel(openDefault ? "0" : "") + }, [openDefault]) + return ( <> - + <>