[pbs-devel] [PATCH proxmox-backup v4 1/5] ui: tape/TapeRestore: fix small DataStoreMappingGrid bugs
Dominik Csapak
d.csapak at proxmox.com
Fri May 21 12:20:18 CEST 2021
enable scrolling by default, and handle the case that getErrors gets
called when the component is not yet rendered
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/tape/window/TapeRestore.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/www/tape/window/TapeRestore.js b/www/tape/window/TapeRestore.js
index 9967d9d8..2a876619 100644
--- a/www/tape/window/TapeRestore.js
+++ b/www/tape/window/TapeRestore.js
@@ -203,6 +203,8 @@ Ext.define('PBS.TapeManagement.DataStoreMappingGrid', {
alias: 'widget.pbsDataStoreMappingField',
mixins: ['Ext.form.field.Field'],
+ scrollable: true,
+
getValue: function() {
let me = this;
let datastores = [];
@@ -246,15 +248,20 @@ Ext.define('PBS.TapeManagement.DataStoreMappingGrid', {
});
}
+ let el = me.getActionEl();
if (error) {
me.addCls(['x-form-trigger-wrap-default', 'x-form-trigger-wrap-invalid']);
let errorMsg = gettext("Need at least one mapping");
- me.getActionEl().dom.setAttribute('data-errorqtip', errorMsg);
+ if (el) {
+ el.dom.setAttribute('data-errorqtip', errorMsg);
+ }
return [errorMsg];
}
me.removeCls(['x-form-trigger-wrap-default', 'x-form-trigger-wrap-invalid']);
- me.getActionEl().dom.setAttribute('data-errorqtip', "");
+ if (el) {
+ el.dom.setAttribute('data-errorqtip', "");
+ }
return [];
},
--
2.20.1
More information about the pbs-devel
mailing list