creativetimofficial/ct-argon-dashboard-pro-laravel

[Bug] Clicking in the menu reloads the page and resets the sidebar

Closed this issue · 11 comments

Version

Latest (Demo)

Reproduction link

https://argon-dashboard-pro-laravel.creative-tim.com/grid

Operating System

Mac OS Mojave

Device

Macbook Pro

Browser & Version

Chrome 77.0.3865.75

Steps to reproduce

Log in
Click any header link (e.g. Components)
Click sub-link (e.g. Grid)

What is expected?

The page to reload, but keep the drop-down list in the side menu open for what you're currently viewing.

What is actually happening?

The page reloads, resets the sidebar which animates again (by sliding in and sliding back out). The user no longer knows that page they are active on as the sidebar has reset.


Solution

I'm not sure if the script is placed in a layout file or within the content file but placing it in the master layout file might solve the issue.

Additional comments

A generous discount for taking the time to report this bug would be much appreciated! :)

Ghitu commented

Hello @dutypro.
Thank you for your observation. we fixed the Argon Dashboard PRO Laravel Demo.

Please send us your email address in order to send you a voucher code.

Many thanks
Alin

I've just purchased and the bug exists in the downloaded files.

How do I fix it?

Argon_Pro-Bug

The GIF doesn't really do it justice as it is a lot smoother but you can see the sidebar keeps collapsing/expanding on page load.

Ghitu commented

Hello, you mean that the Laravel menu still stands open?
Yes, that is intended. If you want it to stop you can remove the active class from the menu element.
Best
Alin

No sorry, what I mean is that on the free version (https://argon-dashboard-laravel.creative-tim.com), a user clicks an item in the expanded menu of "Laravel Examples" and only the content section of the page reloads (almost like an iframe).

Whereas on the Pro version (https://demos.creative-tim.com/argon-dashboard-pro/), a user clicks a link in the sidebar and it reloads the entire page, animating the actions of the sidebar (like in the image above).

Ghitu commented

Hello @dutypro
There is no iframe, maybe your pages loaded a little quicker.
Just so you know, you referenced the pro version of the HTML template.

All the best
Alin

Ghitu commented

Hello @dutypro.
The sidebar is realoading also on the free version, it's just that the free dashboard has fewer features on it so it loads faster.
There is no functionality built to have the sidebar separately load from the right side content

All the best
Alin

Ah, I see. How do we unpin/inanimate the sidebar? The jQuery looks a little confusing but seems to have variables to allow it.

Hi @dutypro,

Thank you for working with our products. If you want the sidebar to be small you have to add 'g-sidenav-hidden' class on the body tag. Please let me know if it works and if you need other details.

All the best,
Rares