cronapp-lib-js 3.2.1-SP.1 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7843,20 +7843,8 @@
|
|
|
7843
7843
|
this._skipRequestsInProgress = true;
|
|
7844
7844
|
skip = math.min(skip || 0, this.total());
|
|
7845
7845
|
callback = isFunction(callback) ? callback : noop;
|
|
7846
|
-
var that = this;
|
|
7847
|
-
|
|
7848
|
-
var size = math.min(pageSkip + take, that.total());
|
|
7849
|
-
// CRONAPP-13284 Problema ao carregar registros de uma fonte de dados do tipo bloco de programação na caixa de seleção
|
|
7850
|
-
// Correção: Obter mais quando o take for menor que o pageSize, e haver mais itens disponivel
|
|
7851
|
-
var expectDataEnd = math.min((skip + take), that.total());
|
|
7852
|
-
if ((expectDataEnd + skip) < that.total()) {
|
|
7853
|
-
expectDataEnd = that.total();
|
|
7854
|
-
var numPageSize = parseInt(that.options.pageSize);
|
|
7855
|
-
if (expectDataEnd > (skip + numPageSize)) {
|
|
7856
|
-
expectDataEnd = skip + numPageSize;
|
|
7857
|
-
}
|
|
7858
|
-
}
|
|
7859
|
-
var data = that._findRange(skip, expectDataEnd);
|
|
7846
|
+
var that = this, pageSkip = math.max(math.floor(skip / take), 0) * take, size = math.min(pageSkip + take, that.total()), data;
|
|
7847
|
+
data = that._findRange(skip, math.min(skip + take, that.total()));
|
|
7860
7848
|
if (data.length || that.total() === 0) {
|
|
7861
7849
|
that._processRangeData(data, skip, take, pageSkip, size);
|
|
7862
7850
|
callback();
|