[pbs-devel] [PATCH widget-toolkit 1/1] form: display-edit: support emptyText

Fiona Ebner f.ebner at proxmox.com
Tue Nov 26 17:23:48 CET 2024


Am 26.11.24 um 16:28 schrieb Thomas Lamprecht:
> Am 26.11.24 um 16:12 schrieb Fiona Ebner:
>> @@ -41,6 +42,19 @@ Ext.define('Proxmox.form.field.DisplayEdit', {
>>  	vm.get('value');
>>      },
>>  
>> +    setEmptyText: function(emptyText) {
>> +	let me = this;
>> +	let vm = me.getViewModel();
>> +
>> +	me.emptyText = emptyText;
>> +	vm.set('emptyText', emptyText);
> 
> did you try to skip this and just directly call the setEmptyText from the
> edit field?
> 
>> +    },
>> +    getEmptyText: function() {
>> +	let me = this;
>> +	let vm = me.getViewModel();
>> +	return vm.get('emptyText');
> 
> same here but with getEmptyText from the underlying editField?
> 
> I mean, it can be fine as is, but if we can skip tracking this twice (here and
> on editField level) it would IMO be a bit more robust.

As also quickly discussed off-list, the slightly hairy bit is getting to
the edit item. I opted for tracking the xtype of the field in v2:
https://lore.proxmox.com/pbs-devel/20241126162005.85583-1-f.ebner@proxmox.com/T/




More information about the pbs-devel mailing list