File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 379379		//pagesize: the number of items to show per page 
380380		pagesize : 10 , 
381381		//currentpage: the current active page in view 
382- 		currentpage : 1 , 
382+ 		currentpage : 0 , 
383383		//pageCount: the number of paginated pages 
384384		pageCount : 0 , 
385385		//itemCount: the number of visible items 
414414			//Show element when it's ready. 
415415			this . $ . aha_table_main . setAttribute ( 'resolved' ,  '' ) ; 
416416			this . $ . aha_table_main . removeAttribute ( 'unresolved' ) ; 
417+ 
418+ 			this . currentpage  =  1 ; 
417419		} , 
418420
419421		//============= 
439441				this . $ . aha_table_main . setAttribute ( 'resolved' ,  '' ) ; 
440442				this . $ . aha_table_main . removeAttribute ( 'unresolved' ) ; 
441443			} 
442- 			this . refreshPagination ( ) ; 
444+ 			this . refreshPagination ( true ) ; 
443445		} , 
444446		modifiedChanged : function ( )  { } , 
445447		//translate value to labels for select 
613615			this . viewingRows  =  filteredRows . slice ( from ,  to ) ; 
614616		} , 
615617		// call this when total count is change. 
616- 		refreshPagination : function ( )  { 
617- 			// Usually go to the first page is the best way to avoid chaos. 
618- 			this . currentpage  =  1 ; 
618+ 		refreshPagination : function ( keepInTheCurentPage )  { 
619+ 			if  ( ! keepInTheCurentPage )  { 
620+ 				// Usually go to the first page is the best way to avoid chaos. 
621+ 				this . currentpage  =  1 ; 
622+ 			} 
619623			// Cache the total page count and item count 
620624			var  count  =  0 ; 
621625			this . data . forEach ( function ( row )  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments