select component updated

This commit is contained in:
Jonas Winkler
2020-10-28 20:21:00 +01:00
parent 330187b7ab
commit 2c190ddcb3
3 changed files with 34 additions and 40 deletions

View File

@@ -1,4 +1,4 @@
import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { v4 as uuidv4 } from 'uuid';
import { AbstractInputComponent } from '../abstract-input';
@@ -28,4 +28,14 @@ export class SelectComponent extends AbstractInputComponent<number> {
@Input()
backgroundColor: any
@Input()
allowNull: boolean = false
@Output()
createNew = new EventEmitter()
showPlusButton(): boolean {
return this.createNew.observers.length > 0
}
}