S
S
sasha_jarvi2020-05-08 19:17:09
JavaScript
sasha_jarvi, 2020-05-08 19:17:09

How to fix sidebar error on page using admin-lte3?

There are pages using admin-lte3 (the front is built with webpack). index.jsI imported everything necessary to the entry point :

import $ from 'jquery'
import popper from 'popper.js';
import bootstrap from 'bootstrap';
import '../node_modules/admin-lte/dist/js/adminlte.min.js'

import './scss/style.scss';


In the layout, I activated the PushMenu plugin (used to switch the sidebar) according to the documentation :

<li class="nav-item">
    <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
</li>


On the desktop, the sidebar works fine, but on the mobile version it does not disappear when you click outside of it, although it should do so without writing additional scripts. How to fix this behavior?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sasha_jarvi, 2020-06-30
@sasha_jarvi

Should be removed from the code <div id="sidebar-overlay">since this element is added automatically when the sidebar is initialized

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question