ninegrid2 6.240.0 → 6.241.0

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.
@@ -17947,15 +17947,10 @@ class ngFiltering
17947
17947
  this.#owner.paging.reset();
17948
17948
  };
17949
17949
 
17950
- #getLastRowIndex = (v = "thead") => {
17950
+ #getLastRowIndex = (v = "thead") =>
17951
+ [...this.#owner.body.querySelectorAll(`.ng-table ${v}`)]
17952
+ .reduce((maxIndex, el) => Math.max(el.rows.length - 1, maxIndex), 0);
17951
17953
 
17952
- let index = 0;
17953
- this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
17954
- index = Math.max(el.rows.length - 1, index);
17955
- });
17956
-
17957
- return index;
17958
- };
17959
17954
  }
17960
17955
 
17961
17956
  class ngFilterButton extends HTMLElement
@@ -17945,15 +17945,10 @@ class ngFiltering
17945
17945
  this.#owner.paging.reset();
17946
17946
  };
17947
17947
 
17948
- #getLastRowIndex = (v = "thead") => {
17948
+ #getLastRowIndex = (v = "thead") =>
17949
+ [...this.#owner.body.querySelectorAll(`.ng-table ${v}`)]
17950
+ .reduce((maxIndex, el) => Math.max(el.rows.length - 1, maxIndex), 0);
17949
17951
 
17950
- let index = 0;
17951
- this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
17952
- index = Math.max(el.rows.length - 1, index);
17953
- });
17954
-
17955
- return index;
17956
- };
17957
17952
  }
17958
17953
 
17959
17954
  class ngFilterButton extends HTMLElement
@@ -124,15 +124,10 @@ export class ngFiltering
124
124
  this.#owner.paging.reset();
125
125
  };
126
126
 
127
- #getLastRowIndex = (v = "thead") => {
127
+ #getLastRowIndex = (v = "thead") =>
128
+ [...this.#owner.body.querySelectorAll(`.ng-table ${v}`)]
129
+ .reduce((maxIndex, el) => Math.max(el.rows.length - 1, maxIndex), 0);
128
130
 
129
- let index = 0;
130
- this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
131
- index = Math.max(el.rows.length - 1, index);
132
- });
133
-
134
- return index;
135
- };
136
131
  }
137
132
 
138
133
  class ngFilterButton extends HTMLElement
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.240.0",
4
+ "version": "6.241.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -124,15 +124,10 @@ export class ngFiltering
124
124
  this.#owner.paging.reset();
125
125
  };
126
126
 
127
- #getLastRowIndex = (v = "thead") => {
127
+ #getLastRowIndex = (v = "thead") =>
128
+ [...this.#owner.body.querySelectorAll(`.ng-table ${v}`)]
129
+ .reduce((maxIndex, el) => Math.max(el.rows.length - 1, maxIndex), 0);
128
130
 
129
- let index = 0;
130
- this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
131
- index = Math.max(el.rows.length - 1, index);
132
- });
133
-
134
- return index;
135
- };
136
131
  }
137
132
 
138
133
  class ngFilterButton extends HTMLElement