From 5c722a2ef9caf40a36c17e97066bccde9291eee6 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Thu, 5 Jan 2023 13:01:46 +0100 Subject: [PATCH] SONAR-18123 Picking a branch of a project when creating application is hard --- .../src/main/js/components/controls/Select.tsx | 18 ++++++++++++++++-- .../__snapshots__/Select-test.tsx.snap | 4 ++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/js/components/controls/Select.tsx b/server/sonar-web/src/main/js/components/controls/Select.tsx index ac408a88ecf..8264eb6e4b7 100644 --- a/server/sonar-web/src/main/js/components/controls/Select.tsx +++ b/server/sonar-web/src/main/js/components/controls/Select.tsx @@ -284,15 +284,29 @@ export function selectStyle< menu: () => ({ borderBottomRightRadius: '4px', borderBottomLeftRadius: '4px', - backgroundColor: '#fff', - border: '1px solid #ccc', + backgroundColor: colors.white, + border: `1px solid ${colors.neutral200}`, borderTopColor: `${colors.barBorderColor}`, boxSizing: 'border-box', marginTop: '-1px', maxHeight: '200px', + zIndex: `${zIndexes.dropdownMenuZIndex}`, + webkitOverflowScrolling: 'touch', + boxShadow: `${others.defaultShadow}`, position: 'absolute', top: '100%', width: '100%', + }), + menuPortal: (baseStyles) => ({ + ...baseStyles, + borderBottomRightRadius: '4px', + borderBottomLeftRadius: '4px', + marginTop: '-1px', + backgroundColor: colors.white, + border: `1px solid ${colors.neutral200}`, + borderTopColor: `${colors.barBorderColor}`, + boxSizing: 'border-box', + maxHeight: '200px', zIndex: `${zIndexes.dropdownMenuZIndex}`, webkitOverflowScrolling: 'touch', boxShadow: `${others.defaultShadow}`, diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Select-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Select-test.tsx.snap index 03af858a909..bca0cddafdf 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Select-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/Select-test.tsx.snap @@ -37,6 +37,7 @@ exports[`Select should render complex select component: other props 1`] = ` "loadingIndicator": [Function], "menu": [Function], "menuList": [Function], + "menuPortal": [Function], "multiValue": [Function], "multiValueLabel": [Function], "multiValueRemove": [Function], @@ -73,6 +74,7 @@ exports[`Select should render correctly: default 1`] = ` "loadingIndicator": [Function], "menu": [Function], "menuList": [Function], + "menuPortal": [Function], "multiValue": [Function], "multiValueLabel": [Function], "multiValueRemove": [Function], @@ -137,6 +139,7 @@ exports[`should render CreatableSelect correctly 1`] = ` "loadingIndicator": [Function], "menu": [Function], "menuList": [Function], + "menuPortal": [Function], "multiValue": [Function], "multiValueLabel": [Function], "multiValueRemove": [Function], @@ -212,6 +215,7 @@ exports[`should render SearchSelect correctly 1`] = ` "loadingIndicator": [Function], "menu": [Function], "menuList": [Function], + "menuPortal": [Function], "multiValue": [Function], "multiValueLabel": [Function], "multiValueRemove": [Function], -- 2.39.5