[pve-devel] [PATCH v2 widget-toolkit 1/1] repo view: replace non-clickable checkbox with icons

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jan 24 16:30:03 CET 2023


Am 24/01/2023 um 16:24 schrieb Thomas Lamprecht:
>> -	    dataIndex: 'Enabled',
>> -	    listeners: {
>> -		beforecheckchange: () => false, // veto, we don't want to allow inline change - to subtle
>> +	    dataindex: 'Enabled',
>> +	    align: 'center',
>> +	    renderer: function(enabled, cell, record) {
>> +		return Proxmox.Utils.render_enabled_icon(record.data.Enabled);
>>  	    },
> could be a one liner without losing clarity:
> 
> renderer: ({data}) => Proxmox.Utils.renderEnabledIcon(data.Enabled),
> 

Actually, as in my reply to 2/2, you break setting dataIndex by writing it
all lowercase, as otherwise you should be able to configure the renderer
function directly, without intermediate call





More information about the pve-devel mailing list