self.optoins.items returns request id, dont overwrite with additional info, if callback needs query, self.options.items should pass that info to callback.
This commit is contained in:
parent
4950898b34
commit
e4b935e5ed
1 changed files with 2 additions and 6 deletions
|
@ -1403,9 +1403,8 @@ Ox.List = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateQuery(callback) { // fixme: shouldn't this be setQuery?
|
function updateQuery(callback) { // fixme: shouldn't this be setQuery?
|
||||||
var data;
|
|
||||||
clear(); // fixme: bad function name ... clear what?
|
clear(); // fixme: bad function name ... clear what?
|
||||||
self.requests.push(data = self.options.items({
|
self.requests.push(self.options.items({
|
||||||
query: self.options.query
|
query: self.options.query
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
var keys = {};
|
var keys = {};
|
||||||
|
@ -1415,10 +1414,7 @@ Ox.List = function(options, self) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
that.triggerEvent(
|
that.triggerEvent(
|
||||||
'init',
|
'init',
|
||||||
Ox.extend(
|
result.data
|
||||||
result.data,
|
|
||||||
data && data.query ? {query: data.query} : {}
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
self.rowLength = getRowLength();
|
self.rowLength = getRowLength();
|
||||||
self.pageLength = self.options.orientation == 'both'
|
self.pageLength = self.options.orientation == 'both'
|
||||||
|
|
Loading…
Reference in a new issue