prune field: use dirtychange event to hide/show clear-trigger

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-23 18:17:23 +01:00
parent 455f5fe5ed
commit bdabc5633f

View 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: {