Fix tx-list load is being constantly triggered. (#531)
This commit is contained in:
parent
794bc99cb6
commit
e70fd0045d
@ -74,7 +74,14 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
onScroll() {
|
||||
this.loadMore.emit();
|
||||
const scrollHeight = document.body.scrollHeight;
|
||||
const scrollTop = document.documentElement.scrollTop;
|
||||
if(scrollHeight > 0){
|
||||
const percentageScrolled = scrollTop * 100 / scrollHeight;
|
||||
if(percentageScrolled > 90){
|
||||
this.loadMore.emit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getTotalTxOutput(tx: Transaction) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user