diff --git a/models/ui_new_fields.py b/models/ui_new_fields.py index e57920b02c14cdb4e32740e4c9276a471d1d07a7..7bf125935e4d48a8f4f0192c5bd46c673e80f31d 100644 --- a/models/ui_new_fields.py +++ b/models/ui_new_fields.py @@ -10,6 +10,7 @@ fieldsModifier = dbui.FieldsModifier('new_fields') fieldsModifier.configure_field('dictionary', headers=['foo', 'faa'], modifyKeys=True, + height=150, dictCfg={"string": "test", "boolean": False, "integer": 0, diff --git a/static/plugin_dbui/src/form/field/Dict.js b/static/plugin_dbui/src/form/field/Dict.js index 769fcc6dbf020d463ac1775d58c08eed8644ed6f..fcc8dfa2a67f3d3ef375d6a9f801f0f50a337c6b 100644 --- a/static/plugin_dbui/src/form/field/Dict.js +++ b/static/plugin_dbui/src/form/field/Dict.js @@ -316,6 +316,7 @@ Ext.define('App.form.field.Dict', { /** * Set the value for the dictionary. + * Loadd the default dictionary when the value is null. * * @param {Object} value * A key, value object which is loaded in the dictioanry. @@ -323,7 +324,7 @@ Ext.define('App.form.field.Dict', { */ setValue: function (value) { - var source = Ext.apply({}, value, this.dictCfg); + var source = value || this.dictCfg; this.grid.setSource(source); return this.callParent([source]);