ninegrid2 6.134.0 → 6.136.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.
@@ -18005,6 +18005,15 @@ class ngFiltering
18005
18005
  this.#owner.paging.reset();
18006
18006
  };
18007
18007
 
18008
+ #getLastRowIndex = (v = "thead") => {
18009
+
18010
+ let index = 0;
18011
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
18012
+ index = Math.max(el.rows.length - 1, index);
18013
+ });
18014
+
18015
+ return index;
18016
+ };
18008
18017
 
18009
18018
  #on = () => {
18010
18019
 
@@ -18012,10 +18021,9 @@ class ngFiltering
18012
18021
 
18013
18022
  this.#isFiltering = true;
18014
18023
 
18015
- var lastRowIndex = 0;
18016
- $(".ng-table thead", this.#owner.body).each((index,el) => {
18017
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
18018
- });
18024
+ const lastRowIndex = this.#getLastRowIndex();
18025
+
18026
+ console.log(lastRowIndex);
18019
18027
 
18020
18028
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18021
18029
 
@@ -18003,6 +18003,15 @@ class ngFiltering
18003
18003
  this.#owner.paging.reset();
18004
18004
  };
18005
18005
 
18006
+ #getLastRowIndex = (v = "thead") => {
18007
+
18008
+ let index = 0;
18009
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
18010
+ index = Math.max(el.rows.length - 1, index);
18011
+ });
18012
+
18013
+ return index;
18014
+ };
18006
18015
 
18007
18016
  #on = () => {
18008
18017
 
@@ -18010,10 +18019,9 @@ class ngFiltering
18010
18019
 
18011
18020
  this.#isFiltering = true;
18012
18021
 
18013
- var lastRowIndex = 0;
18014
- $(".ng-table thead", this.#owner.body).each((index,el) => {
18015
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
18016
- });
18022
+ const lastRowIndex = this.#getLastRowIndex();
18023
+
18024
+ console.log(lastRowIndex);
18017
18025
 
18018
18026
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18019
18027
 
@@ -140,6 +140,15 @@ export class ngFiltering
140
140
  this.#owner.paging.reset();
141
141
  };
142
142
 
143
+ #getLastRowIndex = (v = "thead") => {
144
+
145
+ let index = 0;
146
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
147
+ index = Math.max(el.rows.length - 1, index);
148
+ });
149
+
150
+ return index;
151
+ };
143
152
 
144
153
  #on = () => {
145
154
 
@@ -147,10 +156,9 @@ export class ngFiltering
147
156
 
148
157
  this.#isFiltering = true;
149
158
 
150
- var lastRowIndex = 0;
151
- $(".ng-table thead", this.#owner.body).each((index,el) => {
152
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
153
- });
159
+ const lastRowIndex = this.#getLastRowIndex();
160
+
161
+ console.log(lastRowIndex);
154
162
 
155
163
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
156
164
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.134.0",
4
+ "version": "6.136.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -140,6 +140,15 @@ export class ngFiltering
140
140
  this.#owner.paging.reset();
141
141
  };
142
142
 
143
+ #getLastRowIndex = (v = "thead") => {
144
+
145
+ let index = 0;
146
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
147
+ index = Math.max(el.rows.length - 1, index);
148
+ });
149
+
150
+ return index;
151
+ };
143
152
 
144
153
  #on = () => {
145
154
 
@@ -147,10 +156,9 @@ export class ngFiltering
147
156
 
148
157
  this.#isFiltering = true;
149
158
 
150
- var lastRowIndex = 0;
151
- $(".ng-table thead", this.#owner.body).each((index,el) => {
152
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
153
- });
159
+ const lastRowIndex = this.#getLastRowIndex();
160
+
161
+ console.log(lastRowIndex);
154
162
 
155
163
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
156
164