import { Component } from '@angular/core'; import { DefaultEditor } from './default-editor'; @Component({ selector: 'checkbox-editor', styleUrls: ['./editor.component.scss'], template: ` `, }) export class CheckboxEditorComponent extends DefaultEditor { constructor() { super(); } onChange(event: any) { const trueVal = (this.cell.getColumn().getConfig() && this.cell.getColumn().getConfig().true) || true; const falseVal = (this.cell.getColumn().getConfig() && this.cell.getColumn().getConfig().false) || false; this.cell.newValue = event.target.checked ? trueVal : falseVal; } }