]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
prune field: use dirtychange event to hide/show clear-trigger
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 23 Nov 2020 17:17:23 +0000 (18:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 23 Nov 2020 17:17:23 +0000 (18:17 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/form/PruneKeepField.js

index ca832d3b47a33405790b1676210a4318a2dabda1..507555b6fe900545bf8b1c38c29cdc1e2d2c75c5 100644 (file)
@@ -6,11 +6,7 @@ Ext.define('Proxmox.form.field.PruneKeep', {
     minValue: 1,
 
     listeners: {
-       change: function(field, newValue, oldValue) {
-           if (newValue !== this.originalValue) {
-               this.triggers.clear.setVisible(true);
-           }
-       },
+       dirtychange: (field, dirty) => field.triggers.clear.setVisible(dirty),
     },
     triggers: {
        clear: {