Infinite scroll replaces "load more" buttons.

This commit is contained in:
softsimon committed 2020-03-01 03:32:12 +07:00
1 parent c9b161423d
commit 90c05ccb51
11 files changed
+34 -13

No files matched your search

@@ -1,4 +1,4 @@
import { Component, OnInit, Input, ChangeDetectionStrategy, OnChanges, ChangeDetectorRef } from '@angular/core';
import { Component, OnInit, Input, ChangeDetectionStrategy, OnChanges, ChangeDetectorRef, Output, EventEmitter } from '@angular/core';
import { StateService } from '../../services/state.service';
import { Observable, forkJoin } from 'rxjs';
import { Block, Outspend, Transaction } from '../../interfaces/electrs.interface';
@@ -15,6 +15,8 @@ export class TransactionsListComponent implements OnInit, OnChanges {
@Input() showConfirmations = false;
@Input() transactionPage = false;
@Output() loadMore = new EventEmitter();
latestBlock$: Observable<Block>;
outspends: Outspend[] = [];
@@ -53,6 +55,10 @@ export class TransactionsListComponent implements OnInit, OnChanges {
});
}
onScroll() {
this.loadMore.emit();
}
getTotalTxOutput(tx: any) {
return tx.vout.map((v: any) => v.value || 0).reduce((a: number, b: number) => a + b);
}