@@ -72,6 +72,9 @@ export class MonitorListComponent implements OnInit, OnDestroy {
72
72
appSearchOrigin : any [ ] = [ ] ;
73
73
appSearchLoading = false ;
74
74
intervalId : any ;
75
+ // save the current sorting status
76
+ currentSortField : string | null = null ;
77
+ currentSortOrder : string | null = null ;
75
78
76
79
switchExportTypeModalFooter : ModalButtonOptions [ ] = [
77
80
{ label : this . i18nSvc . fanyi ( 'common.button.cancel' ) , type : 'default' , onClick : ( ) => ( this . isSwitchExportTypeModalVisible = false ) }
@@ -149,7 +152,7 @@ export class MonitorListComponent implements OnInit, OnDestroy {
149
152
}
150
153
151
154
sync ( ) {
152
- this . loadMonitorTable ( ) ;
155
+ this . loadMonitorTable ( this . currentSortField , this . currentSortOrder ) ;
153
156
}
154
157
155
158
getAppIconName ( app : string | undefined ) : string {
@@ -499,9 +502,9 @@ export class MonitorListComponent implements OnInit, OnDestroy {
499
502
this . pageIndex = pageIndex ;
500
503
this . pageSize = pageSize ;
501
504
const currentSort = sort . find ( item => item . value !== null ) ;
502
- const sortField = ( currentSort && currentSort . key ) || null ;
503
- const sortOrder = ( currentSort && currentSort . value ) || null ;
504
- this . changeMonitorTable ( sortField , sortOrder ) ;
505
+ this . currentSortField = ( currentSort && currentSort . key ) || null ;
506
+ this . currentSortOrder = ( currentSort && currentSort . value ) || null ;
507
+ this . changeMonitorTable ( this . currentSortField , this . currentSortOrder ) ;
505
508
}
506
509
507
510
// begin: app type search filter
0 commit comments