mirror of
https://github.com/mempool/mempool.git
synced 2025-04-08 03:48:31 +02:00
Merge pull request #5278 from mempool/natsoni/fix-keynav-events
Fix issue on key navigation logic
This commit is contained in:
commit
2fc89f6a35
@ -81,11 +81,13 @@ export class BlocksList implements OnInit {
|
||||
})
|
||||
).subscribe();
|
||||
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
|
||||
this.keyNavigationSubscription = this.stateService.keyNavigation$
|
||||
.pipe(
|
||||
filter((event) => event.key === prevKey || event.key === nextKey),
|
||||
tap((event) => {
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
if (event.key === prevKey && this.page > 1) {
|
||||
this.page--;
|
||||
this.isLoading = true;
|
||||
|
@ -73,11 +73,13 @@ export class RecentPegsListComponent implements OnInit {
|
||||
}),
|
||||
).subscribe();
|
||||
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
|
||||
this.keyNavigationSubscription = this.stateService.keyNavigation$
|
||||
.pipe(
|
||||
filter((event) => event.key === prevKey || event.key === nextKey),
|
||||
tap((event) => {
|
||||
const prevKey = this.dir === 'ltr' ? 'ArrowLeft' : 'ArrowRight';
|
||||
const nextKey = this.dir === 'ltr' ? 'ArrowRight' : 'ArrowLeft';
|
||||
if (event.key === prevKey && this.page > 1) {
|
||||
this.page--;
|
||||
this.isLoading = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user