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

Menu item doesn't change to "selected" style if not an "href" item #20

Open
rust-jvm-go opened this issue Sep 17, 2023 · 1 comment
Open

Comments

@rust-jvm-go
Copy link

Hello,

I have a menu item that is not an "href", and when clicked it doesn't change to the "selected" appearance.

I have tried setting activeClass = true but to no avail.

I think this is related to this:

how to programmatically decide if a menu item is selected or not

How to make non-href items use "selected" style when clicked?

@amirkian007
Copy link
Owner

amirkian007 commented Sep 17, 2023

HI @rust-jvm-go
actually activeClass is a string not a boolean (my mistake in the docs) , what it does is that in applies a custom class name to the menu item when the menu item is active , meaning that the menu item MUST have an href to have an activecalss.
now the only way to to make non-href items use "selected" style when clicked is to handle it with event listener and update the menu list .

i am gonna add a feature for this and let you know when its done :))
my schedule is pretty busy ,but i should be up in a few days.

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

No branches or pull requests

2 participants