mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 22:58:30 +01:00
Fix tx-list load is being constantly triggered. (#531)
This commit is contained in:
parent
794bc99cb6
commit
e70fd0045d
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue