ninegrid2 6.1203.0 → 6.1205.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.
@@ -12308,10 +12308,14 @@ class ngCellEx extends HTMLElement
12308
12308
  let fn = this.getAttribute("onbuttonclick") || this.getAttribute("onButtonClick") || this.cell.getAttribute("onbuttonclick") || this.cell.getAttribute("onButtonClick");// || this.getAttribute("@onlinkclick");
12309
12309
  console.log(fn);
12310
12310
  if (fn) {
12311
+
12311
12312
  fn = fn.replace("()","");
12312
12313
 
12313
- if (this.owner[fn]) {
12314
- this.owner[fn].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
12314
+ // 괄호 앞부분만 추출하는 정규식
12315
+ const methodName = fn.match(/^(\w+)\s*\(/)[1];
12316
+
12317
+ if (this.owner[methodName]) {
12318
+ this.owner[methodName].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
12315
12319
  }
12316
12320
  else {
12317
12321
  this.owner.exprFunction(fn).call(this, this.cell.closest("tr").data, parseInt(this.cell.dataset.row));
@@ -12304,10 +12304,14 @@ class ngCellEx extends HTMLElement
12304
12304
  let fn = this.getAttribute("onbuttonclick") || this.getAttribute("onButtonClick") || this.cell.getAttribute("onbuttonclick") || this.cell.getAttribute("onButtonClick");// || this.getAttribute("@onlinkclick");
12305
12305
  console.log(fn);
12306
12306
  if (fn) {
12307
+
12307
12308
  fn = fn.replace("()","");
12308
12309
 
12309
- if (this.owner[fn]) {
12310
- this.owner[fn].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
12310
+ // 괄호 앞부분만 추출하는 정규식
12311
+ const methodName = fn.match(/^(\w+)\s*\(/)[1];
12312
+
12313
+ if (this.owner[methodName]) {
12314
+ this.owner[methodName].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
12311
12315
  }
12312
12316
  else {
12313
12317
  this.owner.exprFunction(fn).call(this, this.cell.closest("tr").data, parseInt(this.cell.dataset.row));
@@ -191,10 +191,14 @@ export class ngCellEx extends HTMLElement
191
191
  let fn = this.getAttribute("onbuttonclick") || this.getAttribute("onButtonClick") || this.cell.getAttribute("onbuttonclick") || this.cell.getAttribute("onButtonClick");// || this.getAttribute("@onlinkclick");
192
192
  console.log(fn);
193
193
  if (fn) {
194
+
194
195
  fn = fn.replace("()","");
195
196
 
196
- if (this.owner[fn]) {
197
- this.owner[fn].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
197
+ // 괄호 앞부분만 추출하는 정규식
198
+ const methodName = fn.match(/^(\w+)\s*\(/)[1];
199
+
200
+ if (this.owner[methodName]) {
201
+ this.owner[methodName].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
198
202
  }
199
203
  else {
200
204
  this.owner.exprFunction(fn).call(this, this.cell.closest("tr").data, parseInt(this.cell.dataset.row));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1203.0",
4
+ "version": "6.1205.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -191,10 +191,14 @@ export class ngCellEx extends HTMLElement
191
191
  let fn = this.getAttribute("onbuttonclick") || this.getAttribute("onButtonClick") || this.cell.getAttribute("onbuttonclick") || this.cell.getAttribute("onButtonClick");// || this.getAttribute("@onlinkclick");
192
192
  console.log(fn);
193
193
  if (fn) {
194
+
194
195
  fn = fn.replace("()","");
195
196
 
196
- if (this.owner[fn]) {
197
- this.owner[fn].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
197
+ // 괄호 앞부분만 추출하는 정규식
198
+ const methodName = fn.match(/^(\w+)\s*\(/)[1];
199
+
200
+ if (this.owner[methodName]) {
201
+ this.owner[methodName].call(this.owner, this.cell.closest("tr").data, parseInt(this.cell.dataset.row), this.cell);
198
202
  }
199
203
  else {
200
204
  this.owner.exprFunction(fn).call(this, this.cell.closest("tr").data, parseInt(this.cell.dataset.row));