Incorrect deferred implementation

This function creates a success object and a deferred object but the success object is never established as a handler for the deferred.  In practice this means that the display callback is never executed and values are never rendered.
This commit is contained in:
Patrick St. laurent 2016-03-11 01:14:54 -05:00
parent 717d7f8594
commit 9275da7cfc

@ -2574,16 +2574,16 @@ List - abstract class for inputs that have source option loaded from js array or
},
value2html: function (value, element, display, response) {
var deferred = $.Deferred(),
success = function () {
if(typeof display === 'function') {
//custom display method
display.call(element, value, this.sourceData, response);
} else {
this.value2htmlFinal(value, element);
}
deferred.resolve();
};
var deferred = $.Deferred();
success = deferred.then(function () {
if(typeof display === 'function') {
//custom display method
display.call(element, value, this.sourceData, response);
} else {
this.value2htmlFinal(value, element);
}
deferred.resolve();
});
//for null value just call success without loading source
if(value === null) {