Skip to content

Commit

Permalink
Merge pull request #43 from dev-ptera/feature/tab-bug-fix
Browse files Browse the repository at this point in the history
Feature/tab bug fix
  • Loading branch information
dev-ptera authored Mar 20, 2023
2 parents 8d5a6d1 + d49c505 commit 33df201
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v2.4.2 (March 10, 2023)

### Fixed

- Fixed bug on accounts page where paginator displays incorrect data on tab switch.

## v2.4.1 (March 10, 2023)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yellow-spyglass-client",
"version": "2.4.1",
"version": "2.4.2",
"scripts": {
"ng": "ng",
"start": "ng serve -c development --open --host 0.0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, OnDestroy, Output, ViewEncapsulation } from '@angular/core';
import { UtilService } from '@app/services/util/util.service';
import { ViewportService } from '@app/services/viewport/viewport.service';
import { Subscription } from 'rxjs';
Expand Down Expand Up @@ -62,7 +62,7 @@ import { TransactionsService } from '@app/services/transactions/transactions.ser
</div>
`,
})
export class TxPaginatorComponent implements OnChanges {
export class TxPaginatorComponent implements OnChanges, OnDestroy {
@Input() blockCount: number;

pageSize: number;
Expand All @@ -73,7 +73,7 @@ export class TxPaginatorComponent implements OnChanges {

constructor(public util: UtilService, public vp: ViewportService, public txService: TransactionsService) {
// Initial state
this.displayedPageNumber = 0;
this.displayedPageNumber = this.txService.confirmedTransactions.currentPage || 0;
this.pageSize = this.txService.filterData.size;

this.pageLoad$ = this.txService.emitPageLoad().subscribe(() => {
Expand Down

0 comments on commit 33df201

Please sign in to comment.