Need to trigger chosen update for single selects too

This commit is contained in:
Nathan Gray 2013-06-19 19:01:42 +00:00
parent bcd52bb375
commit eaa0cb6fa0

View File

@ -448,7 +448,7 @@ var et2_selectbox = et2_inputWidget.extend(
{ {
_value = _value.split(','); _value = _value.split(',');
} }
if(this.options.tags) if(this.options.tags || this.options.search)
{ {
this.input.val(_value); this.input.val(_value);
this.input.trigger("liszt:updated"); this.input.trigger("liszt:updated");
@ -642,6 +642,7 @@ var et2_selectbox = et2_inputWidget.extend(
this._appendOptionElement(key, _options[key]); this._appendOptionElement(key, _options[key]);
} }
} }
// Sometimes value gets set before options // Sometimes value gets set before options
if(this.value || this.options.empty_label) this.set_value(this.value); if(this.value || this.options.empty_label) this.set_value(this.value);
}, },