Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Sidebar not working correctly with React.js on Vite #5597

Open
MikhaelMounay opened this issue Jun 3, 2024 · 0 comments
Open

[BUG] Sidebar not working correctly with React.js on Vite #5597

MikhaelMounay opened this issue Jun 3, 2024 · 0 comments
Labels

Comments

@MikhaelMounay
Copy link

This is a very similar bug discussed in this issue.
#1570

I working on a web application with AdminLTE 3 and React.js 18 on Vite 5.
The sidebar works fine without adding any code on Google Chrome and Brave. However, this error persists on Microsoft Edge (Chromium based) where the buttons of the tree view are not working.

If I use this snippet,

export function loadTreeview() {
    $('[data-widget="treeview"]').each(function () {
        if ($(this).data('treeview-init') === undefined) {
            $(this).Treeview('init');
            $(this).data('treeview-init', true);
        }
    });
}

MS Edge works fine, but Google Chrome & Brave don't work as expected where the menus expand only but don't collapse.

Anyone has an idea ?!
Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant