TemplateEvent
Format used when adding events to elements generated from TemplateCellRenderer or ColumnObject.template
Signature:
export interface TemplateEvent Remarks
Selects elements using the given selector and then adds an event.
Example
column.renderer = {
type: "html",
template: `<input type='button' value='click' data-itemindex=\${itemindex}></input>`,
templateEvents: {
selector: 'input[type="button"]',
event: {
onclick: function(e) {console.log(e)}
}
}
}Properties
| Property | Type | Description |
|---|---|---|
| event | Partial<GlobalEventHandlers> | Event name and method to be executed |
| selector | string | Selector for element |
Properties Desc
event
Event name and method to be executed
Type - Partial<GlobalEventHandlers>
selector
Selector for elements
Type - string
Remarks:
Selects the child elements of the renderer. Use the same selector used for querySelect.