The Sidebar has to be closed on clicking any part of screen
Application Type
Reactive

Hi 

I have one sidebar which has form in it. The close option of the sidebar has to be performed in two ways

1)On clicking the close icon some validation(action) has to be done before closing

2)Same closing has to be done on clicking any part of screen and same action has to be performed


Thanks in Advance


Hi @Prathoswar ,

You may need to look at below component -

https://www.outsystems.com/forge/component-overview/9404/click-event-handler

https://www.outsystems.com/forums/discussion/26142/close-popup-when-clicking-outside-the-window/

Catch the  handler and write your own validation before toggling it off.

Thanks,

Vani

Hi Prathoswar,

you can achieve the second scenario by adding the below JS to your screen

document.onclick = function()

{

$(#closebuttonId).Click(); // it will click the close button

};

on close button action check the sidebar is opened or not by maintaining any flag 

this function would be called whenever you will click on your screen

Hope this will give you an idea!!!

Regards,

Krushna


Hello Pratoshwar

Have you tried this with the Default Nav Menu in UI Kit of OutSystems? That's already works in the same way you are asking for. Please try using this Block for Menu and if needed you can apply Toggle Action to Open and Close


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