diff --git a/package-lock.json b/package-lock.json index 1a5d616e..6ff33b79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.4.3", "license": "ISC", "dependencies": { - "@web-atoms/core": "^2.4.0", + "@web-atoms/core": "^2.4.1", "@web-atoms/data-styles": "^1.0.108", "@web-atoms/date-time": "^1.0.26", "@web-atoms/module-loader": "^2.1.33", @@ -20,9 +20,9 @@ } }, "node_modules/@web-atoms/core": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@web-atoms/core/-/core-2.4.0.tgz", - "integrity": "sha512-UdHef4te6tJ74mxFBRGZp81cSdOSrW8xNdZCgTcazbs+VSoElKcUSwRy6VLEK5AhQcCOOuIIb7xyZcytEng/NA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@web-atoms/core/-/core-2.4.1.tgz", + "integrity": "sha512-DbrQpTHEVflLen1vq9Sb0vne2Yx827H8GSIrF8V4t7MG+8cehLwstMG5g4d/Dfprge653imBbALZAGRTXLex9w==", "dependencies": { "@web-atoms/date-time": "^1.1.1", "reflect-metadata": "^0.1.14" @@ -57,9 +57,9 @@ }, "dependencies": { "@web-atoms/core": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@web-atoms/core/-/core-2.4.0.tgz", - "integrity": "sha512-UdHef4te6tJ74mxFBRGZp81cSdOSrW8xNdZCgTcazbs+VSoElKcUSwRy6VLEK5AhQcCOOuIIb7xyZcytEng/NA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@web-atoms/core/-/core-2.4.1.tgz", + "integrity": "sha512-DbrQpTHEVflLen1vq9Sb0vne2Yx827H8GSIrF8V4t7MG+8cehLwstMG5g4d/Dfprge653imBbALZAGRTXLex9w==", "requires": { "@web-atoms/date-time": "^1.1.1", "reflect-metadata": "^0.1.14" diff --git a/package.json b/package.json index cd0b83c4..b7ef9b2f 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/web-atoms/web-controls#readme", "dependencies": { - "@web-atoms/core": "^2.4.0", + "@web-atoms/core": "^2.4.1", "@web-atoms/date-time": "^1.0.26", "@web-atoms/module-loader": "^2.1.33", "@web-atoms/data-styles": "^1.0.108", diff --git a/src/basic/AtomRepeater.tsx b/src/basic/AtomRepeater.tsx index 1b2b8251..51feba30 100644 --- a/src/basic/AtomRepeater.tsx +++ b/src/basic/AtomRepeater.tsx @@ -927,7 +927,7 @@ export default class AtomRepeater extends AtomControl { } else { container.appendChild(e); } - this.render(en, e, (this as any).creator ?? this); + this.render(en, e, this.creator || this); // start = start.nextElementSibling as HTMLElement; } @@ -999,7 +999,7 @@ export default class AtomRepeater extends AtomControl { } else { element.removeAttribute("data-selected-item"); } - this.render(e, element, (this as any).creator || this); + this.render(e, element, this.creator || this); if (this.enableDragDrop) { updateDragDrop(element); } @@ -1009,8 +1009,8 @@ export default class AtomRepeater extends AtomControl { } protected render(node: XNode, e?: any, creator?: any): void { - if (!(this as any).creator && this !== creator) { - (this as any).creator = creator; + if (!this.creator && this !== creator) { + this.creator = creator; } this.render = super.render; return super.render(node, e, creator); @@ -1114,7 +1114,7 @@ export default class AtomRepeater extends AtomControl { const node = itemRenderer(item); const element = document.createElement(node.attributes?.for ?? node.name ?? "div"); element.dataset[name] = name; - this.render(node, element, (this as any).creator || this); + this.render(node, element, this.creator || this); if (insert) { presenter.insertBefore(element, presenter.firstElementChild); } else {