Fix missing option check to work with options sent as an in-order array (label,value), fixes some custom fields not being properly set.

This commit is contained in:
Nathan Gray 2015-10-05 15:25:10 +00:00
parent 816c9c0a96
commit 05ea41493d

View File

@ -490,7 +490,9 @@ var et2_selectbox = et2_inputWidget.extend(
{
if(_value && jQuery("option[value='"+_value+"']", this.input).prop("selected", true).length == 0)
{
if(this.options.select_options[_value])
if(this.options.select_options[_value] ||
this.options.select_options.filter &&
this.options.select_options.filter(function(value) {return value == _value;}))
{
// Options not set yet? Do that now, which will try again.
return this.set_select_options(this.options.select_options);