discovery setting bug fix

This commit is contained in:
insanity 2018-03-19 20:33:56 +09:00
parent 62fb671a44
commit c194b9ff1d
2 changed files with 6 additions and 9 deletions

View File

@ -25,13 +25,6 @@ export const menus = [
'chip': false,
'open': false,
},
{
'name': 'App.SensorSetting',
'link': '/sensor-setting',
'icon': 'indeterminate_check_box',
'chip': false,
'open': false,
},
{
'name': 'App.Probes',
'link': '/probes',

View File

@ -1,4 +1,4 @@
import { Component, OnInit, Input } from '@angular/core';
import { Component, OnInit, Input, OnDestroy } from '@angular/core';
import { MatChipInputEvent } from '@angular/material';
@Component({
@ -6,7 +6,7 @@ import { MatChipInputEvent } from '@angular/material';
templateUrl: './input-chip.component.html',
styleUrls: ['./input-chip.component.scss']
})
export class InputChipComponent implements OnInit {
export class InputChipComponent implements OnInit, OnDestroy {
selectedItems = new Array();
@Input() unselectedItems;
@ -18,6 +18,10 @@ export class InputChipComponent implements OnInit {
this.selectAll();
}
ngOnDestroy() {
this.unselectAll();
}
selected(app: any) {
this.selectedItems.push(app);
this.remove(this.unselectedItems, app);