ninegrid2 6.135.0 → 6.137.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.
@@ -18007,8 +18007,6 @@ class ngFiltering
18007
18007
 
18008
18008
  #getLastRowIndex = (v = "thead") => {
18009
18009
 
18010
- console.log(v);
18011
-
18012
18010
  let index = 0;
18013
18011
  this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
18014
18012
  index = Math.max(el.rows.length - 1, index);
@@ -18019,29 +18017,23 @@ class ngFiltering
18019
18017
 
18020
18018
  #on = () => {
18021
18019
 
18022
- console.log("onnnnnnn");
18023
-
18024
18020
  this.#isFiltering = true;
18025
18021
 
18026
- const lastRowIndex = this.#getLastRowIndex("thead");
18027
-
18028
- console.log(lastRowIndex);
18022
+ const lastRowIndex = this.#getLastRowIndex();
18029
18023
 
18030
- $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18024
+ this.#owner.body.querySelectorAll(".ng-table thead th,.ng-table thead td").forEach((el) => {
18031
18025
 
18032
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
18026
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18033
18027
 
18034
- var colnms = [];
18035
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
18036
- if (el.dataset.bind) colnms.push(el.dataset.bind);
18037
- });
18038
- if (colnms.length == 0) return true;
18039
-
18040
- //console.log(colnms);
18041
-
18042
- $(el).append($(`<ng-filter-button></ng-filter-button`));
18043
- el.querySelector("ng-filter-button").colnms = colnms;
18044
-
18028
+ var colnms = [];
18029
+ $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
18030
+ if (el.dataset.bind) colnms.push(el.dataset.bind);
18031
+ });
18032
+ if (colnms.length != 0) {
18033
+ $(el).append($(`<ng-filter-button></ng-filter-button`));
18034
+ el.querySelector("ng-filter-button").colnms = colnms;
18035
+ }
18036
+ }
18045
18037
  //console.log(el.querySelector("ng-filter-button").colnms);
18046
18038
  });
18047
18039
  };
@@ -18005,8 +18005,6 @@ class ngFiltering
18005
18005
 
18006
18006
  #getLastRowIndex = (v = "thead") => {
18007
18007
 
18008
- console.log(v);
18009
-
18010
18008
  let index = 0;
18011
18009
  this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
18012
18010
  index = Math.max(el.rows.length - 1, index);
@@ -18017,29 +18015,23 @@ class ngFiltering
18017
18015
 
18018
18016
  #on = () => {
18019
18017
 
18020
- console.log("onnnnnnn");
18021
-
18022
18018
  this.#isFiltering = true;
18023
18019
 
18024
- const lastRowIndex = this.#getLastRowIndex("thead");
18025
-
18026
- console.log(lastRowIndex);
18020
+ const lastRowIndex = this.#getLastRowIndex();
18027
18021
 
18028
- $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
18022
+ this.#owner.body.querySelectorAll(".ng-table thead th,.ng-table thead td").forEach((el) => {
18029
18023
 
18030
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
18024
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18031
18025
 
18032
- var colnms = [];
18033
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
18034
- if (el.dataset.bind) colnms.push(el.dataset.bind);
18035
- });
18036
- if (colnms.length == 0) return true;
18037
-
18038
- //console.log(colnms);
18039
-
18040
- $(el).append($(`<ng-filter-button></ng-filter-button`));
18041
- el.querySelector("ng-filter-button").colnms = colnms;
18042
-
18026
+ var colnms = [];
18027
+ $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
18028
+ if (el.dataset.bind) colnms.push(el.dataset.bind);
18029
+ });
18030
+ if (colnms.length != 0) {
18031
+ $(el).append($(`<ng-filter-button></ng-filter-button`));
18032
+ el.querySelector("ng-filter-button").colnms = colnms;
18033
+ }
18034
+ }
18043
18035
  //console.log(el.querySelector("ng-filter-button").colnms);
18044
18036
  });
18045
18037
  };
@@ -142,8 +142,6 @@ export class ngFiltering
142
142
 
143
143
  #getLastRowIndex = (v = "thead") => {
144
144
 
145
- console.log(v);
146
-
147
145
  let index = 0;
148
146
  this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
149
147
  index = Math.max(el.rows.length - 1, index);
@@ -154,29 +152,23 @@ export class ngFiltering
154
152
 
155
153
  #on = () => {
156
154
 
157
- console.log("onnnnnnn");
158
-
159
155
  this.#isFiltering = true;
160
156
 
161
- const lastRowIndex = this.#getLastRowIndex("thead");
162
-
163
- console.log(lastRowIndex);
157
+ const lastRowIndex = this.#getLastRowIndex();
164
158
 
165
- $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
159
+ this.#owner.body.querySelectorAll(".ng-table thead th,.ng-table thead td").forEach((el) => {
166
160
 
167
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
161
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
168
162
 
169
- var colnms = [];
170
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
171
- if (el.dataset.bind) colnms.push(el.dataset.bind);
172
- });
173
- if (colnms.length == 0) return true;
174
-
175
- //console.log(colnms);
176
-
177
- $(el).append($(`<ng-filter-button></ng-filter-button`));
178
- el.querySelector("ng-filter-button").colnms = colnms;
179
-
163
+ var colnms = [];
164
+ $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
165
+ if (el.dataset.bind) colnms.push(el.dataset.bind);
166
+ });
167
+ if (colnms.length != 0) {
168
+ $(el).append($(`<ng-filter-button></ng-filter-button`));
169
+ el.querySelector("ng-filter-button").colnms = colnms;
170
+ }
171
+ }
180
172
  //console.log(el.querySelector("ng-filter-button").colnms);
181
173
  });
182
174
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.135.0",
4
+ "version": "6.137.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -142,8 +142,6 @@ export class ngFiltering
142
142
 
143
143
  #getLastRowIndex = (v = "thead") => {
144
144
 
145
- console.log(v);
146
-
147
145
  let index = 0;
148
146
  this.#owner.body.querySelectorAll(`.ng-table ${v}`).forEach((el) => {
149
147
  index = Math.max(el.rows.length - 1, index);
@@ -154,29 +152,23 @@ export class ngFiltering
154
152
 
155
153
  #on = () => {
156
154
 
157
- console.log("onnnnnnn");
158
-
159
155
  this.#isFiltering = true;
160
156
 
161
- const lastRowIndex = this.#getLastRowIndex("thead");
162
-
163
- console.log(lastRowIndex);
157
+ const lastRowIndex = this.#getLastRowIndex();
164
158
 
165
- $(".ng-table thead th,.ng-table thead td", this.#owner.body).each((index,el) => {
159
+ this.#owner.body.querySelectorAll(".ng-table thead th,.ng-table thead td").forEach((el) => {
166
160
 
167
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
161
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
168
162
 
169
- var colnms = [];
170
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
171
- if (el.dataset.bind) colnms.push(el.dataset.bind);
172
- });
173
- if (colnms.length == 0) return true;
174
-
175
- //console.log(colnms);
176
-
177
- $(el).append($(`<ng-filter-button></ng-filter-button`));
178
- el.querySelector("ng-filter-button").colnms = colnms;
179
-
163
+ var colnms = [];
164
+ $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
165
+ if (el.dataset.bind) colnms.push(el.dataset.bind);
166
+ });
167
+ if (colnms.length != 0) {
168
+ $(el).append($(`<ng-filter-button></ng-filter-button`));
169
+ el.querySelector("ng-filter-button").colnms = colnms;
170
+ }
171
+ }
180
172
  //console.log(el.querySelector("ng-filter-button").colnms);
181
173
  });
182
174
  };