From eaa0cb6fa040b65c24ed791761be4917f0dd811d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 19 Jun 2013 19:01:42 +0000 Subject: [PATCH] Need to trigger chosen update for single selects too --- etemplate/js/et2_widget_selectbox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index cef8bc8a2d..ccf09a3e56 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -448,7 +448,7 @@ var et2_selectbox = et2_inputWidget.extend( { _value = _value.split(','); } - if(this.options.tags) + if(this.options.tags || this.options.search) { this.input.val(_value); this.input.trigger("liszt:updated"); @@ -642,6 +642,7 @@ var et2_selectbox = et2_inputWidget.extend( this._appendOptionElement(key, _options[key]); } } + // Sometimes value gets set before options if(this.value || this.options.empty_label) this.set_value(this.value); },