How do I know when a submenu is active #8254
Unanswered
LisaRyrholm
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I'll bring up
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a problem that I can't find an answer to so I hope someone here can help me out.
I am doing a menu with a submenu where I need to run a javascript when the submenu is opening (need to set the height on the submenu based on the height of the topmenu + trigger a gtm interaction event).
The structure looks like this:
My problem is that MenuItem has a onHover that works well for triggering the setHeight method. But when I navigate the menu with keyboards this never triggers.
I tried the onAction method but this method never fire for a menu item that opens a sub menu. It only triggers when you are navigating to a href.
Idealy I would like a onPress or onOpening function I can use for triggering the height and gtm interaction event.
How can I achive this?
Beta Was this translation helpful? Give feedback.
All reactions