You've already forked nginx-proxy-manager
mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-14 11:42:26 +03:00
Fix #4831 mobile header menu not working
This commit is contained in:
@@ -175,7 +175,11 @@ const getMenuDropown = (item: MenuItem, onClick?: () => void) => {
|
||||
);
|
||||
};
|
||||
|
||||
export function SiteMenu() {
|
||||
interface Props {
|
||||
mobileExpanded?: boolean;
|
||||
setMobileExpanded?: (expanded: boolean) => void;
|
||||
}
|
||||
export function SiteMenu({ mobileExpanded = false, setMobileExpanded }: Props) {
|
||||
// This is hacky AF. But that's the price of using a non-react UI kit.
|
||||
const closeMenus = () => {
|
||||
const navMenus = document.querySelectorAll(".nav-item.dropdown");
|
||||
@@ -185,12 +189,13 @@ export function SiteMenu() {
|
||||
if (dropdown) {
|
||||
dropdown.classList.remove("show");
|
||||
}
|
||||
setMobileExpanded?.(false);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<header className="navbar-expand-md">
|
||||
<div className="collapse navbar-collapse">
|
||||
<div className={cn("collapse", "navbar-collapse", { show: mobileExpanded })} id="navbar-menu">
|
||||
<div className="navbar">
|
||||
<div className="container-xl">
|
||||
<div className="row flex-column flex-md-row flex-fill align-items-center">
|
||||
|
||||
Reference in New Issue
Block a user