we previously removed the 'filters' property from the store, but this
has the effect that the filter array is only ever initialized when
we try to access them via the specified api of extjs

so instead of adding them manually to their array, use the 'addFilter'
method of extjs

also use 'getStore()' instead of directly accessing the store to be
consistent with the extjs api use

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/form/VMSelector.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
index e9eb5dbaa..4c0bba137 100644
--- a/www/manager6/form/VMSelector.js
+++ b/www/manager6/form/VMSelector.js
@@ -211,7 +211,7 @@ Ext.define('PVE.form.VMSelector', {
        me.getStore().load({ params: { type: 'vm' } });
 
        if (me.nodename) {
-           me.store.filters.add({
+           me.getStore().addFilter({
                property: 'node',
                exactMatch: true,
                value: me.nodename,
@@ -230,7 +230,7 @@ Ext.define('PVE.form.VMSelector', {
                    break;
            }
            if (statusfilter !== '') {
-               me.store.filters.add({
+               me.getStore().addFilter([{
                    property: 'template',
                    value: 0,
                }, {
@@ -238,7 +238,7 @@ Ext.define('PVE.form.VMSelector', {
                    operator: 'in',
                    property: 'status',
                    value: [statusfilter],
-               });
+               }]);
            }
        }
 
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to