Skip to content

Commit

Permalink
Navigation Menus: don't use DropdownButton (#5229)
Browse files Browse the repository at this point in the history
Bump components
Update ProductNavigation
  • Loading branch information
labkey-alan authored Feb 14, 2024
1 parent 0f37197 commit 88d923e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
14 changes: 7 additions & 7 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
},
"dependencies": {
"@labkey/components": "3.20.0",
"@labkey/components": "3.21.0",
"@labkey/themes": "1.3.3"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions core/src/client/ProductNavigation/ProductNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FC, memo } from 'react';
import React, { FC, memo, useRef } from 'react';
import { ProductNavigationMenu } from '@labkey/components';

import './productNavigation.scss';
Expand All @@ -12,8 +12,9 @@ interface Props {
}

export const ProductNavigation: FC<Props> = memo(props => {
const menuRef = useRef();
if (props.context.show) {
return <ProductNavigationMenu disableLKSContainerLink />;
return <ProductNavigationMenu menuRef={menuRef} disableLKSContainerLink />;
} else {
return null;
}
Expand Down
15 changes: 10 additions & 5 deletions core/src/client/ProductNavigation/productNavigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
@import "../../../node_modules/@labkey/components/dist/assets/scss/theme/navbar";
@import "../../../node_modules/@labkey/components/dist/assets/scss/theme/product-navigation";

#headerProductDropdown .dropdown-menu-right {
padding: 0;

#headerProductDropdown {
// We render the ProductNavigation within a bootstrap dropdown button in LKS, which makes the navbar-icon-connector
// a redundant element that we need to hide.
.navbar-icon-connector {
right: 6px;
display: none;
}

.navbar-menu__content {
top: 0;
margin: 0;
}
}
}

0 comments on commit 88d923e

Please sign in to comment.