This repository has been archived by the owner on Jul 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 426
Reactstrap 5.x Dropdowns do not work correctly #57
Labels
Comments
iaincollins
added a commit
that referenced
this issue
Jan 6, 2018
Partly addresses issues in #57 * Dropdown menus in the nav menu on mobile now display correctly. * The nav menu no longer requires JavaScript to be enabled to work and uses a pure CSS solution. I may prototype to extend this to other components and see if it’s a pull request the Reactstrap folks would be interested in.
The issue with dropdown menus in the navbar not rendering properly on mobile has been fixed with CSS. .navbar .dropdown {
display: block;
}
@media (max-width: 768px) {
.navbar .dropdown-menu {
position: relative !important;
display: block !important;
transform: none !important;
padding: 0 0 10px 0;
border: none;
}
} The main menu navbar no longer requires JavaScript using input checkboxes combined with CSS, but this has not been extended to other dropdown menus yet. <label for="navbar-menu-toggle" className="d-block d-md-none">
<span className="icon ion-md-menu p-2" style={{fontSize: '1.5em'}}></span>
</label>
<input type="checkbox" id="navbar-menu-toggle" className="nojs-dropdown-toggle" aria-label="Menu"/>
<div className="nojs-dropdown-content">
…
</div> .nojs-dropdown-content {
width: 100%;
}
.nojs-dropdown-toggle {
display: none;
}
@media (max-width: 767px) {
.nojs-dropdown-content {
display: none;
}
.nojs-dropdown-toggle:checked + .nojs-dropdown-content {
display: block;
}
} |
iaincollins
added a commit
that referenced
this issue
Jan 12, 2018
Partly addresses issues in #57 * Dropdown menus in the nav menu on mobile now display correctly. * The nav menu no longer requires JavaScript to be enabled to work and uses a pure CSS solution. I may prototype to extend this to other components and see if it’s a pull request the Reactstrap folks would be interested in.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
They don't render correctly on mobile, and they don't work without JavaScript enabled on the client.
These are both issues with Reactstrap. The former is likely to be fixed in updates to Reactstrap 5.x alpha, but the latter will require additional work if we want to resolve that.
As the site supports universal rendering and sessions I'd like to resolve the issue with navigation.
The text was updated successfully, but these errors were encountered: