Closed Neo149 closed 3 years ago
Sidebar Mini not working
Hello @Neo149,
Thank you for using our products and for letting us know about this issue, we will solve it into the next update. Until then, we'll ask you to delete the old initialization for perfectScrollbar
and the sidebar will work properly.
Your if statement should look like in the example below, so please change in your project in examples/dashboard.html
at line 1117:
if (md.misc.sidebar_mini_active == true) {
$('body').removeClass('sidebar-mini');
md.misc.sidebar_mini_active = false;
if ($(".sidebar").length != 0) {
var ps = new PerfectScrollbar('.sidebar');
}
if ($(".sidebar-wrapper").length != 0) {
var ps1 = new PerfectScrollbar('.sidebar-wrapper');
}
if ($(".main-panel").length != 0) {
var ps2 = new PerfectScrollbar('.main-panel');
}
if ($(".main").length != 0) {
var ps3 = new PerfectScrollbar('main');
}
$('html').addClass('perfect-scrollbar-on');
} else {
$('html').addClass('perfect-scrollbar-off');
ps = null;
setTimeout(function() {
$('body').addClass('sidebar-mini');
md.misc.sidebar_mini_active = true;
}, 300);
}
Hope that information helps you. Please let us know if we can help you with anything else.
All the best, Stefan
Thank you.