Skip to content

Commit

Permalink
Prevent to "show" the menu when at wrong context.
Browse files Browse the repository at this point in the history
  • Loading branch information
joselrio committed Sep 6, 2024
1 parent 38b2ff3 commit 750ff3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/scripts/OutSystems/OSUI/Utils/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,17 @@ namespace OutSystems.OSUI.Utils.Menu {

// Method that will make menu visible
const _showMenu = (): void => {
// Check if the menu should be shown
const shouldShowMenu =
OSFramework.OSUI.Helper.DeviceInfo.IsDesktop === false ||
_appProp.layout.isAsideMenuOverlay ||
_appProp.layout.isAsideExpandable;

// If not, prevent menu to be shown
if (shouldShowMenu === false) {
return;
}

// Update app properties
if (_appProp.menu.element === undefined || _appProp.layout.element === undefined) {
_setAppProps();
Expand Down

0 comments on commit 750ff3f

Please sign in to comment.