Dropdown Menu close on link click

When I click a link on the nav item's dropdown menu, the menu stays open as the page navigates (since the header stays the same and only the content is changed via React and React Router). Is it possible to close the menu after link click?

Text formatting options
Submit

Replies (1)

Hi,

This is done on purpose since the currently activated nav menu should be open and the currently open link must be activated.

If you want to hide menu items when you change the page you can call hideAccordions function for menu instance.

menu?.hideAccordions(menuItem);

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Text formatting options
Submit
Text formatting options
Submit