@@ -3,6 +3,7 @@ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement
33import property from "@ui5/webcomponents-base/dist/decorators/property.js" ;
44import slot from "@ui5/webcomponents-base/dist/decorators/slot.js" ;
55import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js" ;
6+ import { isPhone } from "@ui5/webcomponents-base/dist/Device.js" ;
67import NavigationLayoutMode from "./types/NavigationLayoutMode.js" ;
78import type SideNavigation from "./SideNavigation.js" ;
89
@@ -28,9 +29,9 @@ const SCREEN_WIDTH_BREAKPOINT = 600;
2829 *
2930 * ### Responsive Behavior
3031 *
31- * On larger screens (screen width of 600px or more) , the side navigation is visible
32+ * On larger screens with a width of 600px or more, excluding mobile phone devices , the side navigation is visible
3233 * by default and can be expanded or collapsed using the `mode` property.
33- * On small screens (screen width of 599px or less) , the side navigation is hidden by
34+ * On mobile phone devices and screens with a width of 599px or less, the side navigation is hidden by
3435 * default and can be displayed using the `mode` property.
3536 *
3637 * ### ES6 Module Import
@@ -63,14 +64,20 @@ class NavigationLayout extends UI5Element {
6364 * @private
6465 */
6566 @property ( { type : Boolean } )
66- sideCollapsed : boolean = window . innerWidth < SCREEN_WIDTH_BREAKPOINT ;
67+ sideCollapsed : boolean = isPhone ( ) || window . innerWidth < SCREEN_WIDTH_BREAKPOINT ;
6768
6869 /**
6970 * @private
7071 */
7172 @property ( { type : Boolean } )
7273 hasSideNavigation = false ;
7374
75+ /**
76+ * @private
77+ */
78+ @property ( { type : Boolean } )
79+ isPhone = isPhone ( ) ;
80+
7481 /**
7582 * Gets whether the side navigation is collapsed.
7683 * @public
@@ -114,7 +121,7 @@ class NavigationLayout extends UI5Element {
114121
115122 calcSideCollapsed ( ) {
116123 if ( this . mode === NavigationLayoutMode . Auto ) {
117- this . sideCollapsed = window . innerWidth < SCREEN_WIDTH_BREAKPOINT ;
124+ this . sideCollapsed = isPhone ( ) || window . innerWidth < SCREEN_WIDTH_BREAKPOINT ;
118125 } else {
119126 this . sideCollapsed = this . mode === NavigationLayoutMode . Collapsed ;
120127 }
0 commit comments