WIP
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
import { DropDownOption } from '../../entity/dropDownOption';
|
||||
import { DropDownBag } from './drop-down-menu/drop-down-menu.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DropDownListService {
|
||||
|
||||
constructor() { }
|
||||
onItemSelect = new Subject<DropDownBag>();
|
||||
|
||||
focusIndexChange = new Subject<DropDownBag>();
|
||||
|
||||
|
||||
selectItem(tag: string, item: DropDownOption) {
|
||||
this.onItemSelect.next({ tag: tag, item: item } as DropDownBag)
|
||||
}
|
||||
setFocusIndex(tag: string, i: number) {
|
||||
this.focusIndexChange.next(
|
||||
{ tag: tag, focusIndex: i } as DropDownBag);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user