ninegrid2 6.133.0 → 6.135.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.
@@ -17927,7 +17927,7 @@ class ngFiltering
17927
17927
 
17928
17928
  for (let key in jsonFilter) {
17929
17929
  const arr = jsonFilter[key];
17930
- const idx = this.#parent.owner.fields.indexOf(key);
17930
+ const idx = this.#owner.fields.indexOf(key);
17931
17931
 
17932
17932
  let isNum = false;
17933
17933
  for (let o of this.getValidData()) {
@@ -17980,7 +17980,7 @@ class ngFiltering
17980
17980
 
17981
17981
  for (let key in jsonFilter) {
17982
17982
  const arr = jsonFilter[key];
17983
- this.#parent.owner.fields.indexOf(key);
17983
+ this.#owner.fields.indexOf(key);
17984
17984
 
17985
17985
  //console.log(filterData);
17986
17986
  ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
@@ -18000,22 +18000,32 @@ class ngFiltering
18000
18000
  }
18001
18001
 
18002
18002
 
18003
- this.#parent.owner.scrollTo_V1(0);
18003
+ this.#owner.scrollTo_V1(0);
18004
18004
 
18005
- this.#parent.owner.paging.reset();
18005
+ this.#owner.paging.reset();
18006
18006
  };
18007
18007
 
18008
+ #getLastRowIndex = (v = "thead") => {
18009
+
18010
+ console.log(v);
18011
+
18012
+ let index = 0;
18013
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
18014
+ index = Math.max(el.rows.length - 1, index);
18015
+ });
18016
+
18017
+ return index;
18018
+ };
18008
18019
 
18009
18020
  #on = () => {
18010
18021
 
18011
18022
  console.log("onnnnnnn");
18012
-
18023
+
18013
18024
  this.#isFiltering = true;
18014
18025
 
18015
- var lastRowIndex = 0;
18016
- $(".ng-table thead", this.#owner.body).each((index,el) => {
18017
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
18018
- });
18026
+ const lastRowIndex = this.#getLastRowIndex("thead");
18027
+
18028
+ console.log(lastRowIndex);
18019
18029
 
18020
18030
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18021
18031
 
@@ -17925,7 +17925,7 @@ class ngFiltering
17925
17925
 
17926
17926
  for (let key in jsonFilter) {
17927
17927
  const arr = jsonFilter[key];
17928
- const idx = this.#parent.owner.fields.indexOf(key);
17928
+ const idx = this.#owner.fields.indexOf(key);
17929
17929
 
17930
17930
  let isNum = false;
17931
17931
  for (let o of this.getValidData()) {
@@ -17978,7 +17978,7 @@ class ngFiltering
17978
17978
 
17979
17979
  for (let key in jsonFilter) {
17980
17980
  const arr = jsonFilter[key];
17981
- this.#parent.owner.fields.indexOf(key);
17981
+ this.#owner.fields.indexOf(key);
17982
17982
 
17983
17983
  //console.log(filterData);
17984
17984
  ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
@@ -17998,22 +17998,32 @@ class ngFiltering
17998
17998
  }
17999
17999
 
18000
18000
 
18001
- this.#parent.owner.scrollTo_V1(0);
18001
+ this.#owner.scrollTo_V1(0);
18002
18002
 
18003
- this.#parent.owner.paging.reset();
18003
+ this.#owner.paging.reset();
18004
18004
  };
18005
18005
 
18006
+ #getLastRowIndex = (v = "thead") => {
18007
+
18008
+ console.log(v);
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
+ };
18006
18017
 
18007
18018
  #on = () => {
18008
18019
 
18009
18020
  console.log("onnnnnnn");
18010
-
18021
+
18011
18022
  this.#isFiltering = true;
18012
18023
 
18013
- var lastRowIndex = 0;
18014
- $(".ng-table thead", this.#owner.body).each((index,el) => {
18015
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
18016
- });
18024
+ const lastRowIndex = this.#getLastRowIndex("thead");
18025
+
18026
+ console.log(lastRowIndex);
18017
18027
 
18018
18028
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18019
18029
 
@@ -62,7 +62,7 @@ export class ngFiltering
62
62
 
63
63
  for (let key in jsonFilter) {
64
64
  const arr = jsonFilter[key];
65
- const idx = this.#parent.owner.fields.indexOf(key);
65
+ const idx = this.#owner.fields.indexOf(key);
66
66
 
67
67
  let isNum = false;
68
68
  for (let o of this.getValidData()) {
@@ -115,7 +115,7 @@ export class ngFiltering
115
115
 
116
116
  for (let key in jsonFilter) {
117
117
  const arr = jsonFilter[key];
118
- const idx = this.#parent.owner.fields.indexOf(key);
118
+ const idx = this.#owner.fields.indexOf(key);
119
119
 
120
120
  //console.log(filterData);
121
121
  ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
@@ -135,22 +135,32 @@ export class ngFiltering
135
135
  }
136
136
 
137
137
 
138
- this.#parent.owner.scrollTo_V1(0);
138
+ this.#owner.scrollTo_V1(0);
139
139
 
140
- this.#parent.owner.paging.reset();
140
+ this.#owner.paging.reset();
141
141
  };
142
142
 
143
+ #getLastRowIndex = (v = "thead") => {
144
+
145
+ console.log(v);
146
+
147
+ let index = 0;
148
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
149
+ index = Math.max(el.rows.length - 1, index);
150
+ });
151
+
152
+ return index;
153
+ };
143
154
 
144
155
  #on = () => {
145
156
 
146
157
  console.log("onnnnnnn");
147
-
158
+
148
159
  this.#isFiltering = true;
149
160
 
150
- var lastRowIndex = 0;
151
- $(".ng-table thead", this.#owner.body).each((index,el) => {
152
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
153
- });
161
+ const lastRowIndex = this.#getLastRowIndex("thead");
162
+
163
+ console.log(lastRowIndex);
154
164
 
155
165
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
156
166
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.133.0",
4
+ "version": "6.135.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -62,7 +62,7 @@ export class ngFiltering
62
62
 
63
63
  for (let key in jsonFilter) {
64
64
  const arr = jsonFilter[key];
65
- const idx = this.#parent.owner.fields.indexOf(key);
65
+ const idx = this.#owner.fields.indexOf(key);
66
66
 
67
67
  let isNum = false;
68
68
  for (let o of this.getValidData()) {
@@ -115,7 +115,7 @@ export class ngFiltering
115
115
 
116
116
  for (let key in jsonFilter) {
117
117
  const arr = jsonFilter[key];
118
- const idx = this.#parent.owner.fields.indexOf(key);
118
+ const idx = this.#owner.fields.indexOf(key);
119
119
 
120
120
  //console.log(filterData);
121
121
  ninegrid.querySelectorAll("ng-filter-button").forEach(v => {
@@ -135,22 +135,32 @@ export class ngFiltering
135
135
  }
136
136
 
137
137
 
138
- this.#parent.owner.scrollTo_V1(0);
138
+ this.#owner.scrollTo_V1(0);
139
139
 
140
- this.#parent.owner.paging.reset();
140
+ this.#owner.paging.reset();
141
141
  };
142
142
 
143
+ #getLastRowIndex = (v = "thead") => {
144
+
145
+ console.log(v);
146
+
147
+ let index = 0;
148
+ this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
149
+ index = Math.max(el.rows.length - 1, index);
150
+ });
151
+
152
+ return index;
153
+ };
143
154
 
144
155
  #on = () => {
145
156
 
146
157
  console.log("onnnnnnn");
147
-
158
+
148
159
  this.#isFiltering = true;
149
160
 
150
- var lastRowIndex = 0;
151
- $(".ng-table thead", this.#owner.body).each((index,el) => {
152
- lastRowIndex = Math.max(el.rows.length - 1, lastRowIndex);
153
- });
161
+ const lastRowIndex = this.#getLastRowIndex("thead");
162
+
163
+ console.log(lastRowIndex);
154
164
 
155
165
  $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
156
166