]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
ComboGrid: improve setting 'editable' default value
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 8 Jan 2018 11:58:56 +0000 (12:58 +0100)
committerDominik Csapak <d.csapak@proxmox.com>
Thu, 11 Jan 2018 13:48:13 +0000 (14:48 +0100)
port commit
bff876ecb5f3388b7d65c491680b9a40574e4744
from pve-manager

commit message:

    This allows child classes to use another default, the initialConfig
    didn't allowed that.
    This is also the ExtJS like way to set defaults.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
form/ComboGrid.js

index 9c88a5d288e725d63b9ee613920c4d132a9ad488..b9fea19f02e00b65a1647ec912387e47ca068656 100644 (file)
@@ -30,6 +30,8 @@ Ext.define('Proxmox.form.ComboGrid', {
     // needed to trigger onKeyUp etc.
     enableKeyEvents: true,
 
+    editable: false,
+
     // override ExtJS method
     // if the field has multiSelect enabled, the store is not loaded, and
     // the displayfield == valuefield, it saves the rawvalue as an array
@@ -254,10 +256,6 @@ Ext.define('Proxmox.form.ComboGrid', {
     initComponent: function() {
        var me = this;
 
-       if (me.initialConfig.editable === undefined) {
-           me.editable = false;
-       }
-
        Ext.apply(me, {
            queryMode: 'local',
            matchFieldWidth: false