diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 4295331994..2aa78ef8b0 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -565,6 +565,8 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co { this.self._rowProvider.categories = null; } + // update array mgr so select widgets in row also get refreshed options + nm.getParent().getArrayMgr('sel_options').data[id] = _response.rows.sel_options[id]; } } else diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index 1120ef3175..a39709030a 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -165,7 +165,9 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( typeof _attrs.select_options == 'undefined' || _attrs.select_options === null ) { - return; + // do not return inside nextmatch, as get_rows data might have changed select_options + // for performance reasons we only do it for first row, which should have id "0[...]" + if (this.getParent()._type != 'rowWidget' || !_attrs.id || _attrs.id[0] != '0') return; } var sel_options = et2_selectbox.find_select_options(this, _attrs['select_options'], _attrs); @@ -1335,7 +1337,7 @@ var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([e * @param {array} _attrs array to add further attributes to */ getDetachedAttributes: function(_attrs) { - _attrs.push("value"); + _attrs.push("value",'select_options'); }, /** @@ -1360,6 +1362,10 @@ var et2_selectbox_ro = (function(){ "use strict"; return et2_selectbox.extend([e */ setDetachedAttributes: function(_nodes, _values) { this.span = jQuery(_nodes[0]); + if (typeof _values.select_options != 'undefined') + { + this.set_select_options(_values.select_options); + } this.set_value(_values["value"]); } });}).call(this);