creativetimofficial / ct-black-dashboard-pro-react

Black Dashboard PRO React: A premium Boostrap & Reactstrap Admin Template
https://www.creative-tim.com/product/black-dashboard-pro-react
40 stars 19 forks source link

[Bug] Active RouteName Issue with Multi Level Collapse #27

Closed khoreftis564 closed 3 years ago

khoreftis564 commented 4 years ago

Version

1.1.0

Reproduction link

https://github.com/khoreftis564/react-black-pro-issue

Operating System

macOS Catalina 10.15.3

Device

Late 2018 Mac Mini A1993

Browser & Version

Chrome 81.0.4044.138

Steps to reproduce

  1. Add multiple routes under a multi-level collapse in route.js
  2. Navigate to one of the child pages.
  3. View sidebar while in one of those routes.

    What is expected?

    Only the active page that you are on should be showing as active.

    What is actually happening?

    All of the child pages under the multi-level collapse are showing as active regardless of which page you are on. In my example either income statement or balance sheet both will have an active indicator next to them.


Solution

Modify the activeRoute function in sidebar.js on line 141 to only show the active page under a multi-level collapse.

Additional comments

Image and code are in the attached repo and a description has been added to the repo's readme

einazare commented 4 years ago

Hello there, @khoreftis564 ,

We'll add this in our next update.

Best, Manu

ntanwir commented 3 years ago

@khoreftis564 were you able to find a fix for this, by any chance?

ntanwir commented 3 years ago

@EINazare hey, any update on this? thanks in advance.

einazare commented 3 years ago

Hello there, @ntanwir ,

At the moment we are stuck on some other projects, and did not have time for an update here. We're going to start updating all of our React products starting with December this year. We just learned that React has changed from v16+ to v17+, and we want to make a clean update with the new React version. This means that we are going to have breaking changes, for example, react-google-maps will no longer be used, since it had some warnings in React v16+, warnings that in React v17+ will throw errors. I think we will reach an update for this product somewhere in late January 2021.

Best, Manu