codyhouse / responsive-sidebar-navigation

An easy-to-integrate side, vertical navigation, ideal for dashboards and admin areas.
https://codyhouse.co
112 stars 68 forks source link

How is the --selected class supposed to get added to the side menu items #4

Open chadwixk opened 3 years ago

chadwixk commented 3 years ago

For desktop, I don't see in the main.js file how the --selected suffix gets added to the cd-side__item class. I'd assume this would be by checking the current window.location and finding it in the side menu li items and if found, applying it?

I searched the main.js file for --selected but only see where it is being read in the expandSiderbarItem() function but not how it is being set.

Is this supposed to work out of the box and I'm missing something, or are we supposed to put in the logic to handle this?