285
Views
8
Comments
Solved
[OutSystems UI] How can you make hover on menu?
outsystems-ui
Reactive icon
Forge asset by OutSystems

How do you make menu with hover? 

Like image below 

How do you make this?


2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Kim,

Sure, can you try following the below-mentioned implementation steps:

  1. Add the Submenu and SubmenuOpenOnHover elements in the module
  2. Use the Submenu widget (define the Name property value) in the Menu block
  3. Add all the Submenu screen links in the Submenu items placeholder
  4. Define OnReady for the Menu block
  5. In the OnReady screen action flow - call the SubmenuOpenOnHover client action passing the SubMenu widget Id

Refer this documentation: patterns/navigation/submenu

I hope this helps you!


Kind regards,

Benjith Sam

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi,

I observed the same and I guess it might be related to react rendering. As a workaround - Call the SubmenuOpenOnHover action (using the JS element) asynchronously by wrapping inside the setTimeout function.

JS Snippet:

setTimeout(function () {
    $actions.SubmenuOpenOnHover($parameters.WidgetId);
}, 0);

Demo App: SubMenuHoverTask

I'm tagging this post with OutSystemsUI forge asset to notify the team about this observation.

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

Reactive_Lab_SubmenuHover.oml
2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi,

For the mentioned requirement, you can try using the Submenu widget referenced from the OutSystemsUI module.


Kind regards,

Benjith Sam

2022-12-05 08-59-55
SeungHwan Kim

I'm sorry but could you please show me how to implement using SubmenuOpenOnHover?

Thank you. 

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Kim,

Sure, can you try following the below-mentioned implementation steps:

  1. Add the Submenu and SubmenuOpenOnHover elements in the module
  2. Use the Submenu widget (define the Name property value) in the Menu block
  3. Add all the Submenu screen links in the Submenu items placeholder
  4. Define OnReady for the Menu block
  5. In the OnReady screen action flow - call the SubmenuOpenOnHover client action passing the SubMenu widget Id

Refer this documentation: patterns/navigation/submenu

I hope this helps you!


Kind regards,

Benjith Sam

2022-12-05 08-59-55
SeungHwan Kim

My brother. 

I did what you've told me but hover doesn't work. Did I do something wrong here? 

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi,

I observed the same and I guess it might be related to react rendering. As a workaround - Call the SubmenuOpenOnHover action (using the JS element) asynchronously by wrapping inside the setTimeout function.

JS Snippet:

setTimeout(function () {
    $actions.SubmenuOpenOnHover($parameters.WidgetId);
}, 0);

Demo App: SubMenuHoverTask

I'm tagging this post with OutSystemsUI forge asset to notify the team about this observation.

Refer to the attached oml

I hope this helps you!


Kind regards,

Benjith Sam

Reactive_Lab_SubmenuHover.oml
2022-12-05 08-59-55
SeungHwan Kim
2021-03-18 21-03-15
Benjith Sam
 
MVP

Yay! we got it solved.

Glad to help you :)


Kind regards,

Benjith Sam

2023-06-15 18-30-12
FRANK JOHNNY GANGUILHET

That's great! I learned something, too! Thanks!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.