in Ox.List, trigger init after timeout, since otherwise a synchronous items function will trigger the event before one can bind to it
This commit is contained in:
parent
803985a160
commit
6a39bdd3bd
1 changed files with 5 additions and 1 deletions
|
@ -1287,7 +1287,11 @@ Ox.List = function(options, self) {
|
|||
self.requests.push(self.options.items({}, function(result) {
|
||||
var keys = {};
|
||||
//Ox.Log('List', 'INIT!!!', result.data)
|
||||
that.triggerEvent('init', result.data);
|
||||
// timeout needed since a synchronous items function
|
||||
// will reach here before one can bind to the init event
|
||||
setTimeout(function() {
|
||||
that.triggerEvent('init', result.data);
|
||||
});
|
||||
self.rowLength = getRowLength();
|
||||
self.pageLength = self.options.orientation == 'both'
|
||||
? self.pageLengthByRowLength[self.rowLength]
|
||||
|
|
Loading…
Reference in a new issue