[pve-devel] [PATCH widget-toolkit 1/2] ComboGrid: use the grids view for the error message
Dominik Csapak
d.csapak at proxmox.com
Wed Jan 18 14:12:56 CET 2023
for most of the combogrids, this does not make a difference, but we
want to have a node selection in some of their toolbars. There
having the error over the whole grid makes it impossible to select a
different node (which might be necessary to get rid of the error), so
we show the error on the view (which is the grids content body only).
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/form/ComboGrid.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/form/ComboGrid.js b/src/form/ComboGrid.js
index 4cb79d0..e903223 100644
--- a/src/form/ComboGrid.js
+++ b/src/form/ComboGrid.js
@@ -306,7 +306,7 @@ Ext.define('Proxmox.form.ComboGrid', {
picker.setMinHeight(100);
}
if (me.loadError) {
- Proxmox.Utils.setErrorMask(picker, me.loadError);
+ Proxmox.Utils.setErrorMask(picker.getView(), me.loadError);
delete me.loadError;
picker.updateLayout();
}
@@ -428,7 +428,7 @@ Ext.define('Proxmox.form.ComboGrid', {
// if the picker exists, we reset its minHeight to the previous saved one or 0
if (me.picker) {
me.picker.setMinHeight(me.savedMinHeight || 0);
- Proxmox.Utils.setErrorMask(me.picker);
+ Proxmox.Utils.setErrorMask(me.picker.getView());
delete me.savedMinHeight;
// we have to update the layout, otherwise the height gets not recalculated
me.picker.updateLayout();
@@ -463,7 +463,7 @@ Ext.define('Proxmox.form.ComboGrid', {
} else {
let msg = Proxmox.Utils.getResponseErrorMessage(o.getError());
if (me.picker) {
- Proxmox.Utils.setErrorMask(me.picker, msg);
+ Proxmox.Utils.setErrorMask(me.picker.getView(), msg);
}
me.loadError = msg;
}
--
2.30.2
More information about the pve-devel
mailing list