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:
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) {
|
value2html: function (value, element, display, response) {
|
||||||
var deferred = $.Deferred(),
|
var deferred = $.Deferred();
|
||||||
success = function () {
|
success = deferred.then(function () {
|
||||||
if(typeof display === 'function') {
|
if(typeof display === 'function') {
|
||||||
//custom display method
|
//custom display method
|
||||||
display.call(element, value, this.sourceData, response);
|
display.call(element, value, this.sourceData, response);
|
||||||
} else {
|
} else {
|
||||||
this.value2htmlFinal(value, element);
|
this.value2htmlFinal(value, element);
|
||||||
}
|
}
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
};
|
});
|
||||||
|
|
||||||
//for null value just call success without loading source
|
//for null value just call success without loading source
|
||||||
if(value === null) {
|
if(value === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user