Added Tag Input
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {ControlValueAccessor, FormControl, ValidationErrors, Validator} from '@angular/forms';
|
||||
|
||||
export abstract class CustomInputComponent implements ControlValueAccessor, Validator {
|
||||
protected value: number;
|
||||
protected value: any;
|
||||
protected parseError: boolean;
|
||||
private propagateChange: (_: any) => void = () => {};
|
||||
private propagateTouch: () => void = () => {};
|
||||
@@ -23,12 +23,12 @@ export abstract class CustomInputComponent implements ControlValueAccessor, Vali
|
||||
public abstract validate(c: FormControl): ValidationErrors;
|
||||
|
||||
// on change
|
||||
protected onChange(value: any): void {
|
||||
protected change(): void {
|
||||
this.propagateChange(this.value);
|
||||
}
|
||||
|
||||
// on touch
|
||||
protected onBlur(): void {
|
||||
protected blur(): void {
|
||||
this.propagateTouch();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user