Commit c1189a12 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update UserDataMultiDefault to use the new definition of the combo.select event.

parent b16c1a57
......@@ -139,14 +139,13 @@ Ext.define('TrackEvents.form.field.UserDataMultiDefault', {
// supersede the base class method to deal with the data type
//
// @param {Ext.form.field.ComboBox} combo
// @param {Ext.data.Model[]} records
// @param {Ext.data.Model} record
//
//
onComboBoxSelect: function (combo, records) {
onComboBoxSelect: function (combo, record) {
"use strict";
var me = this,
record = records.length ? records[0] : null,
cfg;
cfg = me.buildSourceConfig(record);
......@@ -193,12 +192,15 @@ Ext.define('TrackEvents.form.field.UserDataMultiDefault', {
// get the configuration for the Ext.grid.property.Grid
record = combo.findRecordByValue(combo.getValue());
cfg = me.buildSourceConfig(record);
// fill the property grid
// NOTE: let the editor take care of the data type conversion
// when the user data block definition change
me.grid.setSource(value, cfg.sourceConfig);
if (record !== false) {
cfg = me.buildSourceConfig(record);
// fill the property grid
// NOTE: let the editor take care of the data type conversion
// when the user data block definition change
me.grid.setSource(value, cfg.sourceConfig);
}
}
// the standard way to set the value for a field
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment