[pve-devel] [PATCH] ext5migrate: handle the case when a component's data is in the config object

Emmanuel Kasper e.kasper at proxmox.com
Mon Aug 3 16:13:23 CEST 2015


In ExtJS5 when we use  the following call (taken from OptionView.js)

	Ext.applyIf(me, {
	    items: {
		xtype: 'pveKVComboBox',
		data: data,
	    }
	});

the data property is not available via me.data, but via me.config.data.
So we need to handle this in the parent class.
---
 www/manager5/form/KVComboBox.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager5/form/KVComboBox.js b/www/manager5/form/KVComboBox.js
index cc25877..455f1bf 100644
--- a/www/manager5/form/KVComboBox.js
+++ b/www/manager5/form/KVComboBox.js
@@ -26,7 +26,7 @@ Ext.define('PVE.form.KVComboBox', {
 
 	me.store = Ext.create('Ext.data.ArrayStore', {
 	    model: 'KeyValue',
-	    data : me.data
+	    data : me.data || me.config.data
 	});
 
 	if (me.initialConfig.editable === undefined) {
-- 
2.1.4





More information about the pve-devel mailing list