Moved stuff around, changed the way I'm storing milestones data
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { DataService } from '../../services/data.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { Observable } from 'rxjs';
|
||||
import { KeyValue } from '../../models/key-value';
|
||||
import { FilterService } from '../../services/filters.service';
|
||||
|
||||
@Component({
|
||||
selector: 'fbi-select',
|
||||
@@ -11,7 +13,12 @@ import { CommonModule } from '@angular/common';
|
||||
})
|
||||
export class SelectComponent {
|
||||
@Input() label!: string;
|
||||
@Input() data!: (string | number)[];
|
||||
@Input() key!: string;
|
||||
@Input() data!: Observable<KeyValue[]>;
|
||||
|
||||
private dataService = inject(DataService);
|
||||
private filterService = inject(FilterService);
|
||||
|
||||
onChange(event: any): void {
|
||||
this.filterService.set(this.key, event?.target?.value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user