Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
defaultValue: undefined,
deleteDefaultValue: false,
deleteEmpty: false,
+ clearOnDisable: false,
},
inputValue: '1',
return data;
},
+ setDisabled: function(disabled) {
+ let me = this;
+
+ // only clear on actual transition
+ let toClearValue = me.clearOnDisable && !me.disabled && disabled;
+
+ me.callParent(arguments);
+
+ if (toClearValue) {
+ me.setValue(false); // TODO: could support other "reset value" or use originalValue?
+ }
+ },
+
// also accept integer 1 as true
setRawValue: function(value) {
let me = this;