2020-01-16 14:37:11 +01:00
|
|
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'framadate-erasable-input',
|
|
|
|
templateUrl: './erasable-input.component.html',
|
|
|
|
styleUrls: ['./erasable-input.component.scss']
|
|
|
|
})
|
|
|
|
export class ErasableInputComponent implements OnInit {
|
|
|
|
|
|
|
|
@Output() inputModelChange = new EventEmitter();
|
|
|
|
|
|
|
|
@Input() get inputModel() {
|
|
|
|
return this.inputModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
set inputModel(val) {
|
|
|
|
}
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
}
|
|
|
|
|
|
|
|
eraseInput() {
|
|
|
|
this.inputModel = '';
|
2020-01-20 15:15:06 +01:00
|
|
|
this.inputModelChange.emit('');
|
2020-01-16 14:37:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|