coreui / coreui-free-bootstrap-admin-template

Free Bootstrap Admin & Dashboard Template
https://coreui.io/product/free-bootstrap-admin-template/
MIT License
11.94k stars 3.14k forks source link

Issue changing config and customizing navigation behavior #594

Closed JerryBels closed 1 year ago

JerryBels commented 2 years ago

Hello,

CoreUI has some functionnalities that seems to be ignored in the docs. I wanted to apply the active state to some menu entries based on conditions, but the JS kept adding it to other elements as well. So I dig in and find that there is this _setActiveLink function that's called. It's great and usually do all the work needed by itself. And this function acts depending on a config:

const Default = {
  activeLinksExact: true,
  groupsAutoCollapse: true
}

I don't see a way for us to change this config, for example to set activeLinksExact to false. Also, there should probably be a way to instruct CoreUI to not mess with classes, so _setActiveLink should be fired conditionally (depending on some sort of config as well).

Thanks :)

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.