working on simManage
This commit is contained in:
Vendored
+5
-4
@@ -3369,10 +3369,11 @@ class DataGrid extends EicComponent {
|
||||
let actions = ui.create(`<div class="cell actions"></div`);
|
||||
|
||||
if(this.options.rowActions && Array.isArray(this.options.rowActions)) {
|
||||
for(let action of this.options.rowActions) {
|
||||
let button = ui.create(`<button eicbutton rounded title="${action.title ? action.title: ''}">${action.icon}</button>`);
|
||||
button.addEventListener('click', action.callback.bind(row.getAttribute('data-id') != '' ? JSON.parse(row.getAttribute('data-id')): this));
|
||||
actions.appendChild(button);
|
||||
for(let action of this.options.rowActions) {
|
||||
const severityAttr = action.severity ? ` ${action.severity}` : ''
|
||||
let button = ui.create(`<button eicbutton rounded${severityAttr} title="${action.title ? action.title: ''}">${action.icon}</button>`)
|
||||
button.addEventListener('click', action.callback.bind(row.getAttribute('data-id') != '' ? JSON.parse(row.getAttribute('data-id')): this))
|
||||
actions.appendChild(button)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user