From bb3d98c26a8b5977c0bb80c3693ab2b67a8019ef Mon Sep 17 00:00:00 2001 From: Ashwini Date: Tue, 15 Oct 2024 14:21:54 +0200 Subject: [PATCH] Bootstrap fixes for broken selects and overlapping dropdown (#2216) * fix broken create options and filter unwanted values in options * fix the overlapping dropdown issue * increase z-Index for InputGroup where it exists with Select * declare new z-index variable in bootstrap-config --- .../global-styles/bootstrap-config.scss | 10 +++ .../global-styles/bootstrap-mods.scss | 4 + app/packs/src/apps/mydb/App.js | 2 +- .../ReactionDetailsProperties.js | 3 +- .../reactions/schemeTab/MaterialGroup.js | 2 +- .../elements/details/samples/SampleDetails.js | 2 +- .../samples/propertiesTab/SampleForm.js | 2 +- .../src/apps/userSettings/Affiliations.js | 82 +++++++++---------- app/packs/src/fetchers/UserSettingsFetcher.js | 6 +- 9 files changed, 65 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/global-styles/bootstrap-config.scss b/app/assets/stylesheets/global-styles/bootstrap-config.scss index e720676ffe..d7d8f6953b 100644 --- a/app/assets/stylesheets/global-styles/bootstrap-config.scss +++ b/app/assets/stylesheets/global-styles/bootstrap-config.scss @@ -4,6 +4,16 @@ $info: #5bc0de; $warning: #f0ad4e; $danger: #d9534f; +$zindex-levels: ( + n1: -1, + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, +); + @import "bootstrap/functions"; @import "bootstrap/variables"; @import "bootstrap/mixins"; diff --git a/app/assets/stylesheets/global-styles/bootstrap-mods.scss b/app/assets/stylesheets/global-styles/bootstrap-mods.scss index 9bd0bd63f1..594941c485 100644 --- a/app/assets/stylesheets/global-styles/bootstrap-mods.scss +++ b/app/assets/stylesheets/global-styles/bootstrap-mods.scss @@ -50,3 +50,7 @@ border-top: var(--bs-popover-border-width) solid var(--bs-popover-border-color); border-radius: 0; } + +.input-group { + z-index: 0; +} diff --git a/app/packs/src/apps/mydb/App.js b/app/packs/src/apps/mydb/App.js index 356960c1d6..b5c28062ed 100644 --- a/app/packs/src/apps/mydb/App.js +++ b/app/packs/src/apps/mydb/App.js @@ -144,7 +144,7 @@ class App extends Component { const { showCollectionTree, showGenericWorkflow, propGenericWorkflow } = this.state; return ( - + diff --git a/app/packs/src/apps/mydb/elements/details/reactions/propertiesTab/ReactionDetailsProperties.js b/app/packs/src/apps/mydb/elements/details/reactions/propertiesTab/ReactionDetailsProperties.js index a58610dca9..5895b61eea 100644 --- a/app/packs/src/apps/mydb/elements/details/reactions/propertiesTab/ReactionDetailsProperties.js +++ b/app/packs/src/apps/mydb/elements/details/reactions/propertiesTab/ReactionDetailsProperties.js @@ -103,12 +103,13 @@ export default class ReactionDetailsProperties extends Component { Solvents (parts) - + {solventsItems} diff --git a/app/packs/src/apps/mydb/elements/details/reactions/schemeTab/MaterialGroup.js b/app/packs/src/apps/mydb/elements/details/reactions/schemeTab/MaterialGroup.js index 45f4ecf571..6c4c0c88b1 100644 --- a/app/packs/src/apps/mydb/elements/details/reactions/schemeTab/MaterialGroup.js +++ b/app/packs/src/apps/mydb/elements/details/reactions/schemeTab/MaterialGroup.js @@ -146,7 +146,7 @@ function GeneralMaterialGroup({ reagentDd = (