|
@ -6,7 +6,6 @@ import { |
|
|
EventEmitter, |
|
|
EventEmitter, |
|
|
Input, |
|
|
Input, |
|
|
OnChanges, |
|
|
OnChanges, |
|
|
OnInit, |
|
|
|
|
|
Output |
|
|
Output |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { FormControl } from '@angular/forms'; |
|
|
import { FormControl } from '@angular/forms'; |
|
@ -17,7 +16,7 @@ import { FormControl } from '@angular/forms'; |
|
|
templateUrl: './toggle.component.html', |
|
|
templateUrl: './toggle.component.html', |
|
|
styleUrls: ['./toggle.component.scss'] |
|
|
styleUrls: ['./toggle.component.scss'] |
|
|
}) |
|
|
}) |
|
|
export class ToggleComponent implements OnChanges, OnInit { |
|
|
export class ToggleComponent implements OnChanges { |
|
|
public static DEFAULT_DATE_RANGE_OPTIONS: ToggleOption[] = [ |
|
|
public static DEFAULT_DATE_RANGE_OPTIONS: ToggleOption[] = [ |
|
|
{ label: $localize`Today`, value: '1d' }, |
|
|
{ label: $localize`Today`, value: '1d' }, |
|
|
{ label: $localize`YTD`, value: 'ytd' }, |
|
|
{ label: $localize`YTD`, value: 'ytd' }, |
|
@ -34,8 +33,6 @@ export class ToggleComponent implements OnChanges, OnInit { |
|
|
|
|
|
|
|
|
public optionFormControl = new FormControl<string>(undefined); |
|
|
public optionFormControl = new FormControl<string>(undefined); |
|
|
|
|
|
|
|
|
public ngOnInit() {} |
|
|
|
|
|
|
|
|
|
|
|
public ngOnChanges() { |
|
|
public ngOnChanges() { |
|
|
this.optionFormControl.setValue(this.defaultValue); |
|
|
this.optionFormControl.setValue(this.defaultValue); |
|
|
} |
|
|
} |
|
|