|
|
@ -1,6 +1,7 @@
|
|
|
|
import {ICellEditorAngularComp} from 'ag-grid-angular';
|
|
|
|
import {ICellEditorAngularComp} from 'ag-grid-angular';
|
|
|
|
import {AfterViewInit, Component, ElementRef, ViewChild} from '@angular/core';
|
|
|
|
import {AfterViewInit, Component, ElementRef, ViewChild} from '@angular/core';
|
|
|
|
import {ICellEditorParams} from 'ag-grid-community';
|
|
|
|
import {ICellEditorParams} from 'ag-grid-community';
|
|
|
|
|
|
|
|
import {debounce} from '../../../../../utility';
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: 'cell-editor-paragraph',
|
|
|
|
selector: 'cell-editor-paragraph',
|
|
|
@ -29,6 +30,9 @@ export class BooleanEditorComponent implements ICellEditorAngularComp, AfterView
|
|
|
|
protected trueValue = 'True';
|
|
|
|
protected trueValue = 'True';
|
|
|
|
protected falseValue = 'False';
|
|
|
|
protected falseValue = 'False';
|
|
|
|
protected emptyValue = '';
|
|
|
|
protected emptyValue = '';
|
|
|
|
|
|
|
|
protected autoDismissDebounce = debounce(() => {
|
|
|
|
|
|
|
|
this.params.stopEditing();
|
|
|
|
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
|
|
|
|
@ViewChild('input') input: ElementRef;
|
|
|
|
@ViewChild('input') input: ElementRef;
|
|
|
|
|
|
|
|
|
|
|
@ -59,5 +63,7 @@ export class BooleanEditorComponent implements ICellEditorAngularComp, AfterView
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.value = true;
|
|
|
|
this.value = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.autoDismissDebounce();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|