We will reuse this component in other place, which might not always
want to show all columns
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
value: /lxc|qemu/,
}],
},
- columns: [
+
+ columnsDeclaration: [
{
header: 'ID',
dataIndex: 'vmid',
},
],
+ // should be a list of 'dataIndex' values, if 'undefined' all declared columns will be included
+ columnSelection: undefined,
+
selModel: {
selType: 'checkboxmodel',
mode: 'SIMPLE',
initComponent: function() {
let me = this;
+ let columns = me.columnsDeclaration.filter((column) =>
+ me.columnSelection ? me.columnSelection.indexOf(column.dataIndex) !== -1 : true,
+ ).map((x) => x);
+
+ me.columns = columns;
+
me.callParent();
if (me.nodename) {