From 406c4700025ff907d4e212f8de5b3c0c53f71fa7 Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Wed, 4 Jan 2023 14:20:53 +0100 Subject: [PATCH] SONAR-17779 Update branch when application settings change --- .../app/components/extensions/ProjectAdminPageExtension.tsx | 4 ++-- server/sonar-web/src/main/js/types/extension.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx index 83ccdfcc598..f6d1ecde96d 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx @@ -25,7 +25,7 @@ import Extension from './Extension'; export default function ProjectAdminPageExtension() { const { extensionKey, pluginKey } = useParams(); - const { component } = React.useContext(ComponentContext); + const { component, onBranchesChange } = React.useContext(ComponentContext); const extension = component && @@ -35,7 +35,7 @@ export default function ProjectAdminPageExtension() { ); return extension ? ( - + ) : ( ); diff --git a/server/sonar-web/src/main/js/types/extension.ts b/server/sonar-web/src/main/js/types/extension.ts index e94a693473e..68f444a69ac 100644 --- a/server/sonar-web/src/main/js/types/extension.ts +++ b/server/sonar-web/src/main/js/types/extension.ts @@ -41,6 +41,7 @@ export interface ExtensionStartMethodParameter { appState: AppState; el: HTMLElement | undefined | null; component?: Component; + onBranchesChange?: (updateBranches?: boolean, updatePRs?: boolean) => void; currentUser: CurrentUser; intl: IntlShape; location: Location; -- 2.39.5