UNPKG

pipeline-builder-demo

Version:
31 lines (22 loc) 650 B
import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core'; import {ITableConfig} from './table-config'; @Component({ selector: 'pb-table-editor', templateUrl: 'table-editor.component.html', styleUrls: ['table-editor.component.scss'], }) export class TableEditorComponent implements OnInit { @Input() config: ITableConfig; @Input() source: any[]; @Output() add = new EventEmitter(); @Output() delete = new EventEmitter<string>(); constructor() { } ngOnInit() { } addRow = () => { this.add.emit(); }; delRow = (name: string) => { this.delete.emit(name); }; }