File tree Expand file tree Collapse file tree 5 files changed +25
-5
lines changed
react/application/src/layouts
vue/application/src/layouts Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " devextreme-cli" ,
3- "version" : " 1.1.9 " ,
3+ "version" : " 1.1.10 " ,
44 "description" : " DevExtreme CLI" ,
55 "keywords" : [
66 " devexpress" ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class SideNavInnerToolbar extends React.Component {
2020 ...this . drawerConfig
2121 } ;
2222
23+ this . scrollViewRef = React . createRef ( ) ;
2324 this . menuPatch = menuPreInitPatch ( this ) ;
2425 }
2526
@@ -53,7 +54,7 @@ class SideNavInnerToolbar extends React.Component {
5354 menuToggleEnabled = { minMenuSize === 0 }
5455 toggleMenu = { this . toggleMenu } />
5556
56- < ScrollView className = { 'layout-body with-footer' } >
57+ < ScrollView ref = { this . scrollViewRef } className = { 'layout-body with-footer' } >
5758 < div className = { 'content' } >
5859 { React . Children . map ( this . props . children , item => {
5960 return item . type !== Footer && item ;
@@ -124,6 +125,10 @@ class SideNavInnerToolbar extends React.Component {
124125 event . stopPropagation ( ) ;
125126 } ;
126127
128+ get scrollView ( ) {
129+ return this . scrollViewRef . current . instance ;
130+ }
131+
127132 get drawerConfig ( ) {
128133 const isXSmall = sizes ( ) [ 'screen-x-small' ] ;
129134 const isLarge = sizes ( ) [ 'screen-large' ] ;
@@ -150,6 +155,7 @@ class SideNavInnerToolbar extends React.Component {
150155 pointerEvent . preventDefault ( ) ;
151156 } else {
152157 this . props . history . push ( path ) ;
158+ this . scrollView . scrollTo ( 0 ) ;
153159 }
154160
155161 if ( this . hideMenuAfterNavigation ) {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class SideNavOuterToolbar extends React.Component {
1818 ...this . drawerConfig
1919 } ;
2020
21+ this . scrollViewRef = React . createRef ( ) ;
2122 this . menuPatch = menuPreInitPatch ( this ) ;
2223 }
2324
@@ -55,7 +56,7 @@ class SideNavOuterToolbar extends React.Component {
5556 opened = { menuOpened }
5657 template = { 'menu' }
5758 >
58- < ScrollView className = { 'with-footer' } >
59+ < ScrollView ref = { this . scrollViewRef } className = { 'with-footer' } >
5960 < div className = { 'content' } >
6061 { React . Children . map ( this . props . children , item => {
6162 return item . type !== Footer && item ;
@@ -104,6 +105,10 @@ class SideNavOuterToolbar extends React.Component {
104105 this . setState ( { ...this . drawerConfig } ) ;
105106 } ;
106107
108+ get scrollView ( ) {
109+ return this . scrollViewRef . current . instance ;
110+ }
111+
107112 get drawerConfig ( ) {
108113 const isXSmall = sizes ( ) [ 'screen-x-small' ] ;
109114 const isLarge = sizes ( ) [ 'screen-large' ] ;
@@ -130,6 +135,7 @@ class SideNavOuterToolbar extends React.Component {
130135 pointerEvent . preventDefault ( ) ;
131136 } else {
132137 this . props . history . push ( path ) ;
138+ this . scrollView . scrollTo ( 0 ) ;
133139 }
134140
135141 if ( this . hideMenuAfterNavigation ) {
Original file line number Diff line number Diff line change 1616 :menu-toggle-enabled =" headerMenuTogglerEnabled"
1717 :toggle-menu-func =" toggleMenu"
1818 />
19- <dx-scroll-view class =" layout-body with-footer" >
19+ <dx-scroll-view ref = " scrollViewRef " class =" layout-body with-footer" >
2020 <slot />
2121 <slot name =" footer" />
2222 </dx-scroll-view >
@@ -106,6 +106,9 @@ export default {
106106 },
107107 headerMenuTogglerEnabled () {
108108 return this .isXSmall ;
109+ },
110+ scrollView () {
111+ return this .$refs [" scrollViewRef" ].instance ;
109112 }
110113 },
111114 watch: {
@@ -119,6 +122,7 @@ export default {
119122 this .menuOpened = false ;
120123 this .menuTemporaryOpened = false ;
121124 }
125+ this .scrollView .scrollTo (0 );
122126 }
123127 },
124128 components: {
Original file line number Diff line number Diff line change 1717 :shading =" drawerOptions.shaderEnabled"
1818 :close-on-outside-click =" drawerOptions.closeOnOutsideClick"
1919 >
20- <dx-scroll-view class =" with-footer" >
20+ <dx-scroll-view ref = " scrollViewRef " class =" with-footer" >
2121 <slot />
2222 <slot name =" footer" />
2323 </dx-scroll-view >
@@ -85,6 +85,9 @@ export default {
8585 },
8686 headerMenuTogglerEnabled () {
8787 return this .isXSmall ;
88+ },
89+ scrollView () {
90+ return this .$refs [" scrollViewRef" ].instance ;
8891 }
8992 },
9093 watch: {
@@ -98,6 +101,7 @@ export default {
98101 this .menuOpened = false ;
99102 this .menuTemporaryOpened = false ;
100103 }
104+ this .scrollView .scrollTo (0 );
101105 }
102106 },
103107 components: {
You can’t perform that action at this time.
0 commit comments