SideNav not coming into view
The overlay appears but the nav is still 105% off to the right, same with if I use {edge: 'left'}.
import React from 'react';
import Nav from 'components/Nav';
import './style.scss';
const links = (
<div>
<li><a href='http://github.com/robcalcroft/x'>About</a></li>
<li><a href='x'>Help</a></li>
<li><a href='#'>Logout</a></li>
</div>
);
export default class Container extends React.Component {
render() {
return (
<nav>
<div className='nav-wrapper container--fluid'>
<img src={require('assets/logo_horz_darkbg.png')} className='nav--logo' alt='x' />
<ul className='right hide-on-med-and-down'>{links}</ul>
<ul id='slide-out' className='side-nav'>{links}</ul>
<a href='#' data-activates='slide-out' className='button-collapse right'>
<span className='nav--mobile-menu'>Menu</span>
</a>
</div>
</nav>
);
}
}
+1
+1 It was working fine with 0.97.5, but stopped with 0.97.6. Reverted back to 0.97.5.
@ScOut3R Can you post your code that wasnt working?
+1 - updated from 0.97.0 to 0.97.6 and the sidenav on narrow screens does not show. No code changes on the page, reverting to the old version gets things back to normal.
The side-nav element gets assigned a transform: translateX(0px); whereas with the old version it was left: 0px;. Adding the latter in the developer console leads to the menu being displayed.
Same for me after update to 0.97.6, a left sidenav not show on narrow screens.
Adding menu_id.css('left','0px'); to make it work :
if (options.edge === 'left') {
dragTarget.css({width: '50%', right: 0, left: ''});
menu_id.velocity({'translateX': [0, -1 * options.menuWidth]}, {duration: 300, queue: false, easing: 'easeOutQuad'});
menu_id.css('left','0px');
}
Any eta on when this will be fixed?
@acburst I am sorry for the extremely late response. I've just checked this issue and it is still present for me with 0.97.7.
$('.document-button').sideNav({
menuWidth: 300,
edge: 'left',
closeOnClick: true
});
<ul id='slide-left' className='side-nav teal darken-2 white-text' >
<li className='title'><h3>Documents</h3></li>
<DocTypes
onFilterType={this.handleFilterType}
/>
<SearchDocs
filterText={this.state.filterText}
onUserInput={this.handleUserInput}
/>
<DocList
docs={this.state.docs}
filterText={this.state.filterText}
filterType={this.state.filterType}
/>
</ul>
Nevermind, by bad.
I had the following hidden in my code somewhere:
#slide-left {
left: -300px;
}
#slide-right {
right: -300px;
}
Removed everything started to work.
edit: nm, working for me now!