Skip to content

Commit

Permalink
Simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Jan 12, 2024
1 parent 9f03a9e commit 365ac94
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions src/basic/AtomRepeater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ export default class AtomRepeater<T = any> 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;
}

Expand Down Expand Up @@ -999,7 +999,7 @@ export default class AtomRepeater<T = any> 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);
}
Expand All @@ -1009,8 +1009,8 @@ export default class AtomRepeater<T = any> 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);
Expand Down Expand Up @@ -1114,7 +1114,7 @@ export default class AtomRepeater<T = any> 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 {
Expand Down

0 comments on commit 365ac94

Please sign in to comment.