flameresttable 1.0.91 → 1.0.93

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flameresttable",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
4
4
  "main": "./src/plugin.ts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -239,8 +239,6 @@ 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);
@@ -248,6 +246,9 @@ export default class FlameTable<T> {
248
246
  // Если всё уже загружено
249
247
  if (this.Pager.total !== 0 && allParams.page > this.Pager.total / this.Pager.perPage) return;
250
248
 
249
+ // Запускаем прогрузку
250
+ this.loadingStatus = 'process';
251
+
251
252
  const rows: Rows<T> = await (this.model as any).constructor.all(allParams);
252
253
 
253
254
  if (exportFilename === null) {
@@ -419,8 +419,8 @@ export default defineComponent({
419
419
 
420
420
  // Проверяем, достиг ли скролл нижней грани элемента
421
421
  if (bottom <= windowHeight) {
422
- // Грузим на одну страницу дальше, т.к. тут отсчёт начинается с 0, то +2
423
- this.Table.update({ page: this.Table.Pager.page + 2, perPage: 20 });
422
+ // Грузим на одну страницу дальше
423
+ this.Table.update({ page: this.Table.Pager.page + 1, perPage: 20 });
424
424
  }
425
425
 
426
426
  },