@magic-xpa/angular 4.1000.0-dev4100.304 → 4.1000.0-dev4100.306

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.
@@ -1732,6 +1732,11 @@ class TaskMagicService {
1732
1732
  }
1733
1733
  }
1734
1734
  break;
1735
+ case CommandType.SET_CHUNK_SIZE:
1736
+ if (!isUndefined(command.number)) {
1737
+ this.tableService.setChunkSize(command.number);
1738
+ }
1739
+ break;
1735
1740
  case CommandType.SET_RECORDS_BEFORE_CURRENT_VIEW:
1736
1741
  this.updateRecordsBeforeCurrentView(command.number);
1737
1742
  break;
@@ -2077,7 +2082,10 @@ class TableMagicService {
2077
2082
  refreshDataSource() {
2078
2083
  }
2079
2084
  getPageSize() {
2080
- return 10;
2085
+ return this.chunkSize;
2086
+ }
2087
+ setChunkSize(size) {
2088
+ this.chunkSize = size;
2081
2089
  }
2082
2090
  getMaxRowsInTable() {
2083
2091
  return this.task.Records.list.length;
@@ -2660,7 +2668,7 @@ class TaskBaseMagicComponent {
2660
2668
  this.mgSub.init();
2661
2669
  }
2662
2670
  ngAfterContentChecked() {
2663
- if (this.task.oldPageSize != this.tableService.getPageSize()) {
2671
+ if (!isNullOrUndefined(this.tableService.getPageSize()) && this.task.oldPageSize != this.tableService.getPageSize()) {
2664
2672
  this.task.resize(this.tableService.getPageSize(), 0);
2665
2673
  this.task.oldPageSize = this.tableService.getPageSize();
2666
2674
  }