Fix blocks list pagination on mobile
This commit is contained in:
		
							parent
							
								
									502ef29e54
								
							
						
					
					
						commit
						e1623b9234
					
				@ -91,7 +91,7 @@
 | 
				
			|||||||
    </table>
 | 
					    </table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <ngb-pagination *ngIf="!widget" class="pagination-container float-right mt-2" [class]="isLoading ? 'disabled' : ''"
 | 
					    <ngb-pagination *ngIf="!widget" class="pagination-container float-right mt-2" [class]="isLoading ? 'disabled' : ''"
 | 
				
			||||||
      [collectionSize]="blocksCount" [rotate]="true" [maxSize]="5" [pageSize]="15" [(page)]="page"
 | 
					      [collectionSize]="blocksCount" [rotate]="true" [maxSize]="maxSize" [pageSize]="15" [(page)]="page"
 | 
				
			||||||
      (pageChange)="pageChange(page)" [boundaryLinks]="true" [ellipses]="false">
 | 
					      (pageChange)="pageChange(page)" [boundaryLinks]="true" [ellipses]="false">
 | 
				
			||||||
    </ngb-pagination>
 | 
					    </ngb-pagination>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -22,6 +22,7 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
  paginationMaxSize: number;
 | 
					  paginationMaxSize: number;
 | 
				
			||||||
  page = 1;
 | 
					  page = 1;
 | 
				
			||||||
  lastPage = 1;
 | 
					  lastPage = 1;
 | 
				
			||||||
 | 
					  maxSize = window.innerWidth <= 767.98 ? 3 : 5;
 | 
				
			||||||
  blocksCount: number;
 | 
					  blocksCount: number;
 | 
				
			||||||
  fromHeightSubject: BehaviorSubject<number> = new BehaviorSubject(this.fromBlockHeight);
 | 
					  fromHeightSubject: BehaviorSubject<number> = new BehaviorSubject(this.fromBlockHeight);
 | 
				
			||||||
  skeletonLines: number[] = [];
 | 
					  skeletonLines: number[] = [];
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user