* [PATCH pve-manager] ui: sdn: dns selector: keep an untouched edit dialog clean
@ 2026-08-06 16:40 Hannes Laimer
2026-08-18 10:49 ` Elias Huhsovitz
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Laimer @ 2026-08-06 16:40 UTC (permalink / raw)
To: pve-devel
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;
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH pve-manager] ui: sdn: dns selector: keep an untouched edit dialog clean
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
0 siblings, 0 replies; 2+ messages in thread
From: Elias Huhsovitz @ 2026-08-18 10:49 UTC (permalink / raw)
To: Hannes Laimer, pve-devel
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.