we need to return null for no value instead of empty array, which gets overwritten by preserved value on server-side

This commit is contained in:
Ralf Becker 2014-09-26 11:25:09 +00:00
parent d537853c54
commit 9ca870d1e7

View File

@ -717,7 +717,8 @@ var et2_selectbox = et2_inputWidget.extend(
{ {
var value = []; var value = [];
jQuery("input:checked",this.multiOptions).each(function(){value.push(this.value);}); jQuery("input:checked",this.multiOptions).each(function(){value.push(this.value);});
this.value = value; // we need to return null for no value instead of empty array, which gets overwritten by preserved value on server-side
this.value = value.length > 0 ? value : null;
} }
else else
{ {