flameresttable 1.0.92 → 1.0.94
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.
- package/package.json +1 -1
- package/src/Table/FlameTable.ts +4 -3
package/package.json
CHANGED
package/src/Table/FlameTable.ts
CHANGED
|
@@ -239,14 +239,15 @@ export default class FlameTable<T> {
|
|
|
239
239
|
const isNeedUpdate = this.opts.onBeforeUpdate(filters, exportFilename !== null);
|
|
240
240
|
if (!isNeedUpdate) return;
|
|
241
241
|
|
|
242
|
-
// Запускаем прогрузку
|
|
243
|
-
this.loadingStatus = 'process';
|
|
244
242
|
|
|
245
243
|
// совмещаем все параметры загрузки
|
|
246
244
|
const allParams = merge({}, { page: this.Pager.page, perPage: this.Pager.perPage }, this.opts.LoadParams, filters);
|
|
247
245
|
|
|
248
246
|
// Если всё уже загружено
|
|
249
|
-
if (this.Pager.total !== 0 && allParams.page > this.Pager.total / this.Pager.perPage) return;
|
|
247
|
+
if (this.Pager.total !== 0 && allParams.page - 1 > this.Pager.total / this.Pager.perPage) return;
|
|
248
|
+
|
|
249
|
+
// Запускаем прогрузку
|
|
250
|
+
this.loadingStatus = 'process';
|
|
250
251
|
|
|
251
252
|
const rows: Rows<T> = await (this.model as any).constructor.all(allParams);
|
|
252
253
|
|