OBaseTableCellEditor
Description
All cell editor in OntimizeWeb extend the OBaseTableCellEditor class. This class provides a set of methods and attributes inherited by all the cell editor components. This methods and attributes are explained on the API section of this page.
Below we will show an example of the custom cell editor.
Example
import { Component, Injector, ViewChild, TemplateRef } from '@angular/core';
import { OBaseTableCellEditor, OTableColumnComponent } from 'ontimize-web-ngx';
@Component({
selector: 'custom-editor',
templateUrl: './custom-editor.component.html'
})
export class OTableCellEditorName extends OBaseTableCellEditor {
@ViewChild('templateref', { read: TemplateRef }) public templateref: TemplateRef<any>;
constructor(protected injector: Injector) {
super(injector);
this.type = 'custom-editor';
OTableColumnComponent.addEditor(this.type, OTableCellEditorName);
}
}
Class: OBaseTableCellEditor
Inputs
Name | Description | Default |
---|---|---|
enabled no | false | yes | true |
Indicates whether or not the field is enabled |
yes |
label string |
The placeholder text form a editor. |
|
required no | false | yes | true |
Indicates whether or not required. |
no |
show-notification-on-edit no | false | yes | true |
Indicates whether or not to show a toast indicating the succesfull update |
no |
show-placeholder no | false | yes | true |
Indicates whether or not to show placeholder in form control. |
no |
update-record-on-edit no | false | yes | true |
Indicates whether or not to update cell data in server after it edition ends |
yes |
Outputs
Name | Description |
---|---|
editionCancelled |
Event triggered when component input is canceled. |
editionCommitted |
Event triggered when component input is committed. |
editionStarted |
Event triggered when component input element started. |
onPostUpdateRecord |
Event triggered after component record is succesfully updated. |