[LN ISP chart] Adds toogle to order by nodes/capacity and show/hide Tor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="d-flex align-items-center justify-content-end">
|
||||
<div class="d-flex align-items-center">
|
||||
<span style="margin-bottom: 0.5rem">{{ textLeft }}</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" (change)="onToggleStatusChanged($event)">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter } from '@angular/core';
|
||||
import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter, AfterViewInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-toggle',
|
||||
@@ -6,11 +6,15 @@ import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter } from
|
||||
styleUrls: ['./toggle.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class ToggleComponent {
|
||||
export class ToggleComponent implements AfterViewInit {
|
||||
@Output() toggleStatusChanged = new EventEmitter<boolean>();
|
||||
@Input() textLeft: string;
|
||||
@Input() textRight: string;
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this.toggleStatusChanged.emit(false);
|
||||
}
|
||||
|
||||
onToggleStatusChanged(e): void {
|
||||
this.toggleStatusChanged.emit(e.target.checked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user