From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pbs-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id E9AA31FF168
	for <inbox@lore.proxmox.com>; Tue, 26 Nov 2024 17:23:50 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 863187519;
	Tue, 26 Nov 2024 17:23:51 +0100 (CET)
Message-ID: <a157d59f-591f-4177-9e4e-fa671bff54db@proxmox.com>
Date: Tue, 26 Nov 2024 17:23:48 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>
References: <20241126151300.71000-1-f.ebner@proxmox.com>
 <20241126151300.71000-2-f.ebner@proxmox.com>
 <0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com>
Content-Language: en-US
From: Fiona Ebner <f.ebner@proxmox.com>
In-Reply-To: <0d6fba4f-8f22-4813-9657-8148cdfb125d@proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.054 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pbs-devel] [PATCH widget-toolkit 1/1] form: display-edit:
 support emptyText
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox Backup Server development discussion
 <pbs-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pbs-devel-bounces@lists.proxmox.com
Sender: "pbs-devel" <pbs-devel-bounces@lists.proxmox.com>

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/


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel