ngx-deebodata-community 0.2.7 → 0.2.9

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/README.md CHANGED
@@ -36,6 +36,23 @@ import { NgxDeebodataCommunity } from 'ngx-deebodata-community';
36
36
  ></ngx-deebodata-community>
37
37
  ```
38
38
 
39
+ **Component Input API**
40
+
41
+ | Input | Type | Default | Description
42
+ |----------|----------|----------|----------|
43
+ | `editable` | `boolean` | `true` | Allows cells to be edited |
44
+ | `rowNumbers` | `boolean` | `true` | Show row numbers on left hand side of grid |
45
+ | `data` | `signal<any[]>` | `[]` | signal Array of objects to display |
46
+ | `color1` | `string` | `""` | Theme color 1 (css, hex, rgb) |
47
+ | `color2` | `string` | `""` | Theme color 2 (css, hex, rgb) |
48
+ | `primaryKey` | `string` | `""` | primary key of your data set, helps performance to add it |
49
+ | `defRowHgt` | `string` | `50px` | default row height (px) |
50
+ | `defGridHgt` | `number` | `500` | default grid height in px |
51
+ | `altRowColor` | `string` | `""` | alternate row color (css, hex, rgb) |
52
+ -
53
+
54
+
55
+
39
56
  Pass valid CSS, rgb, or hex colors to **color1, color2, & altRowColor**
40
57
 
41
58
  Always pass a **px** value to defRowHgt like '50px'
@@ -2685,7 +2685,6 @@ class NgxDeebodataCommunity {
2685
2685
  const lfs = this.dataTableService.listenForScroll();
2686
2686
  this.execVertScrollUp(this.columnNames, this.columnNames.length, dtb.scrollTop, true);
2687
2687
  this.execHorizScroll(dtb.scrollLeft);
2688
- this.handleScrollEnd();
2689
2688
  if (lfs && this.rows.some(r => r.height !== this.dataTableService.defltRHgt))
2690
2689
  this.setAllRowsDefHgt();
2691
2690
  if (!lfs)
@@ -2712,7 +2711,7 @@ class NgxDeebodataCommunity {
2712
2711
  this.clearValidatedEdit();
2713
2712
  if (this.finishScrollTO)
2714
2713
  this.finishScrollTO.unsubscribe();
2715
- this.finishScrollTO = timer(150).subscribe(() => { this.completeScroll(); });
2714
+ this.finishScrollTO = timer(100).subscribe(() => { this.completeScroll(); });
2716
2715
  }
2717
2716
  execHorizScroll(left) {
2718
2717
  const head = this.dataTableHeaders.nativeElement;
@@ -2868,7 +2867,7 @@ class NgxDeebodataCommunity {
2868
2867
  }
2869
2868
  }
2870
2869
  }
2871
- applyToDomRows(rows, cols, colLen, lastVisInd, dir, defNum, newRows) {
2870
+ applyToDomRows(rows, cols, colLen, lastVisInd, dir, defNum, newRows, force) {
2872
2871
  const len = this.rows.length;
2873
2872
  let nrowsAcctFor = 0;
2874
2873
  let chks = [];
@@ -2948,7 +2947,7 @@ class NgxDeebodataCommunity {
2948
2947
  if (bhToAdd)
2949
2948
  this.belowHgt.set((this.belowHgt() + bhToAdd));
2950
2949
  }
2951
- this.finishApplyingDomRows(newRows);
2950
+ this.finishApplyingDomRows(newRows, force);
2952
2951
  }
2953
2952
  getLastRowBot() {
2954
2953
  const els = document.getElementsByClassName("data-table-row");
@@ -3064,14 +3063,16 @@ class NgxDeebodataCommunity {
3064
3063
  }
3065
3064
  const vlen = this.dataTableService.visibleCols.length;
3066
3065
  const lastVisInd = cols.indexOf(this.dataTableService.visibleCols[(vlen - 1)]) + 1;
3067
- this.applyToDomRows(rows, cols, colLen, lastVisInd, "up", defNum, repl);
3066
+ this.applyToDomRows(rows, cols, colLen, lastVisInd, "up", defNum, repl, force);
3068
3067
  });
3069
3068
  }
3070
- finishApplyingDomRows(newRows) {
3069
+ finishApplyingDomRows(newRows, force) {
3071
3070
  this.setRowNumbers();
3072
3071
  this.fixRowContainer(0);
3073
3072
  this.setLastRowIndex();
3074
3073
  this.cleanRowChecks();
3074
+ if (force && !this.isScrolling)
3075
+ this.handleScrollEnd();
3075
3076
  }
3076
3077
  handleValidatedCellEditFocus(cellData) {
3077
3078
  this.validatedEditType = cellData.type;