From: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>
To: "Hannes Laimer" <h.laimer@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH pve-manager] ui: sdn: dns selector: keep an untouched edit dialog clean
Date: Tue, 18 Aug 2026 12:49:06 +0200 [thread overview]
Message-ID: <DKS0ENYGVRIF.3CSRNYNVWL4ZH@proxmox.com> (raw)
In-Reply-To: <20260806164001.1901538-1-h.laimer@proxmox.com>
Gave this a quick test. After applying the patch the "Reset form data"
button is no longer enabled when no changs have been made.
Other selectors such as RouteMapSelector.js resolve this issue by
explicitly setting
allowBlank: true,
config: {
value: null,
}
But as far as I understand this might not be optimal here, and chaning
the default value for the selector might have unintended consequences.
IMO changing the value in ComboGrid directly makes sense, should this
arise again. (I also couldn't find a place where we differentiate
between null and an empty string, after a quick search)
Therefore consider this.
Reviewed-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Tested-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
On Thu Aug 6, 2026 at 6:40 PM CEST, Hannes Laimer wrote:
> The selector starts out on the empty string, and once its store has
> loaded an empty selection reads back as null. Both mean that no server
> is picked, but the dirty tracking told them apart, so just opening a
> zone edit dialog enabled its reset button and let an unchanged form be
> submitted.
>
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
> just noticed here because zone edit kept being marked as dirty, this
> could also make sense in ComboGrid directly (don't think we ever
> actually differentiate between `null` and `''`?)
>
> www/manager6/form/SDNDnsSelector.js | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/www/manager6/form/SDNDnsSelector.js b/www/manager6/form/SDNDnsSelector.js
> index 7a134541..9d36e8d7 100644
> --- a/www/manager6/form/SDNDnsSelector.js
> +++ b/www/manager6/form/SDNDnsSelector.js
> @@ -8,6 +8,10 @@ Ext.define(
> valueField: 'dns',
> displayField: 'dns',
>
> + isEqual: function (value1, value2) {
> + return String(value1 ?? '') === String(value2 ?? '');
> + },
> +
> initComponent: function () {
> var me = this;
>
prev parent reply other threads:[~2026-08-18 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 16:40 [PATCH pve-manager] ui: sdn: dns selector: keep an untouched edit dialog clean Hannes Laimer
2026-08-18 10:49 ` Elias Huhsovitz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DKS0ENYGVRIF.3CSRNYNVWL4ZH@proxmox.com \
--to=e.huhsovitz@proxmox.com \
--cc=h.laimer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.