ninegrid2 6.136.0 → 6.138.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.
@@ -18015,34 +18015,50 @@ class ngFiltering
18015
18015
  return index;
18016
18016
  };
18017
18017
 
18018
- #on = () => {
18019
-
18020
- console.log("onnnnnnn");
18018
+ #on_bak = () => {
18021
18019
 
18022
18020
  this.#isFiltering = true;
18023
18021
 
18024
18022
  const lastRowIndex = this.#getLastRowIndex();
18025
18023
 
18026
- console.log(lastRowIndex);
18027
-
18028
- $(".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) => {
18029
18025
 
18030
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
18026
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18031
18027
 
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
-
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
+ }
18043
18037
  //console.log(el.querySelector("ng-filter-button").colnms);
18044
18038
  });
18045
18039
  };
18040
+ #on = () => {
18041
+ this.#isFiltering = true;
18042
+
18043
+ const lastRowIndex = this.#getLastRowIndex();
18044
+
18045
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((el) => {
18046
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18047
+ let colnms = [];
18048
+
18049
+ this.#owner.template.querySelectorAll(`[data-col="${el.dataset.col}"]`).forEach((elem) => {
18050
+ if (elem.dataset.bind) colnms.push(elem.dataset.bind);
18051
+ });
18052
+
18053
+ if (colnms.length !== 0) {
18054
+ const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
18055
+ el.appendChild(filterButton);
18056
+ filterButton.colnms = colnms; // ✅ 속성 설정
18057
+ }
18058
+ }
18059
+ });
18060
+ };
18061
+
18046
18062
  off = () => {
18047
18063
  this.#isFiltering = false;
18048
18064
  $(".ng-table ng-filter-button", this.#owner.body).remove();
@@ -18013,34 +18013,50 @@ class ngFiltering
18013
18013
  return index;
18014
18014
  };
18015
18015
 
18016
- #on = () => {
18017
-
18018
- console.log("onnnnnnn");
18016
+ #on_bak = () => {
18019
18017
 
18020
18018
  this.#isFiltering = true;
18021
18019
 
18022
18020
  const lastRowIndex = this.#getLastRowIndex();
18023
18021
 
18024
- console.log(lastRowIndex);
18025
-
18026
- $(".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) => {
18027
18023
 
18028
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
18024
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18029
18025
 
18030
- var colnms = [];
18031
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
18032
- if (el.dataset.bind) colnms.push(el.dataset.bind);
18033
- });
18034
- if (colnms.length == 0) return true;
18035
-
18036
- //console.log(colnms);
18037
-
18038
- $(el).append($(`<ng-filter-button></ng-filter-button`));
18039
- el.querySelector("ng-filter-button").colnms = colnms;
18040
-
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
+ }
18041
18035
  //console.log(el.querySelector("ng-filter-button").colnms);
18042
18036
  });
18043
18037
  };
18038
+ #on = () => {
18039
+ this.#isFiltering = true;
18040
+
18041
+ const lastRowIndex = this.#getLastRowIndex();
18042
+
18043
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((el) => {
18044
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
18045
+ let colnms = [];
18046
+
18047
+ this.#owner.template.querySelectorAll(`[data-col="${el.dataset.col}"]`).forEach((elem) => {
18048
+ if (elem.dataset.bind) colnms.push(elem.dataset.bind);
18049
+ });
18050
+
18051
+ if (colnms.length !== 0) {
18052
+ const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
18053
+ el.appendChild(filterButton);
18054
+ filterButton.colnms = colnms; // ✅ 속성 설정
18055
+ }
18056
+ }
18057
+ });
18058
+ };
18059
+
18044
18060
  off = () => {
18045
18061
  this.#isFiltering = false;
18046
18062
  $(".ng-table ng-filter-button", this.#owner.body).remove();
@@ -150,34 +150,50 @@ export class ngFiltering
150
150
  return index;
151
151
  };
152
152
 
153
- #on = () => {
154
-
155
- console.log("onnnnnnn");
153
+ #on_bak = () => {
156
154
 
157
155
  this.#isFiltering = true;
158
156
 
159
157
  const lastRowIndex = this.#getLastRowIndex();
160
158
 
161
- console.log(lastRowIndex);
162
-
163
- $(".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) => {
164
160
 
165
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
161
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
166
162
 
167
- var colnms = [];
168
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
169
- if (el.dataset.bind) colnms.push(el.dataset.bind);
170
- });
171
- if (colnms.length == 0) return true;
172
-
173
- //console.log(colnms);
174
-
175
- $(el).append($(`<ng-filter-button></ng-filter-button`));
176
- el.querySelector("ng-filter-button").colnms = colnms;
177
-
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
+ }
178
172
  //console.log(el.querySelector("ng-filter-button").colnms);
179
173
  });
180
174
  };
175
+ #on = () => {
176
+ this.#isFiltering = true;
177
+
178
+ const lastRowIndex = this.#getLastRowIndex();
179
+
180
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((el) => {
181
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
182
+ let colnms = [];
183
+
184
+ this.#owner.template.querySelectorAll(`[data-col="${el.dataset.col}"]`).forEach((elem) => {
185
+ if (elem.dataset.bind) colnms.push(elem.dataset.bind);
186
+ });
187
+
188
+ if (colnms.length !== 0) {
189
+ const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
190
+ el.appendChild(filterButton);
191
+ filterButton.colnms = colnms; // ✅ 속성 설정
192
+ }
193
+ }
194
+ });
195
+ };
196
+
181
197
  off = () => {
182
198
  this.#isFiltering = false;
183
199
  $(".ng-table ng-filter-button", this.#owner.body).remove();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.136.0",
4
+ "version": "6.138.0",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
7
7
  "import": "./dist/index.js",
@@ -150,34 +150,50 @@ export class ngFiltering
150
150
  return index;
151
151
  };
152
152
 
153
- #on = () => {
154
-
155
- console.log("onnnnnnn");
153
+ #on_bak = () => {
156
154
 
157
155
  this.#isFiltering = true;
158
156
 
159
157
  const lastRowIndex = this.#getLastRowIndex();
160
158
 
161
- console.log(lastRowIndex);
162
-
163
- $(".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) => {
164
160
 
165
- if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 != lastRowIndex) return true;
161
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
166
162
 
167
- var colnms = [];
168
- $(this.#owner.template).find(`[data-col=${el.dataset.col}]`).each((index,el) => {
169
- if (el.dataset.bind) colnms.push(el.dataset.bind);
170
- });
171
- if (colnms.length == 0) return true;
172
-
173
- //console.log(colnms);
174
-
175
- $(el).append($(`<ng-filter-button></ng-filter-button`));
176
- el.querySelector("ng-filter-button").colnms = colnms;
177
-
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
+ }
178
172
  //console.log(el.querySelector("ng-filter-button").colnms);
179
173
  });
180
174
  };
175
+ #on = () => {
176
+ this.#isFiltering = true;
177
+
178
+ const lastRowIndex = this.#getLastRowIndex();
179
+
180
+ this.#owner.body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach((el) => {
181
+ if (el.closest("tr").sectionRowIndex + el.rowSpan - 1 === lastRowIndex) {
182
+ let colnms = [];
183
+
184
+ this.#owner.template.querySelectorAll(`[data-col="${el.dataset.col}"]`).forEach((elem) => {
185
+ if (elem.dataset.bind) colnms.push(elem.dataset.bind);
186
+ });
187
+
188
+ if (colnms.length !== 0) {
189
+ const filterButton = document.createElement("ng-filter-button"); // ✅ `ng-filter-button` 생성
190
+ el.appendChild(filterButton);
191
+ filterButton.colnms = colnms; // ✅ 속성 설정
192
+ }
193
+ }
194
+ });
195
+ };
196
+
181
197
  off = () => {
182
198
  this.#isFiltering = false;
183
199
  $(".ng-table ng-filter-button", this.#owner.body).remove();