Skip to content

Commit 53047bc

Browse files
committed
Update config.ts
1 parent bd2f1ec commit 53047bc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ export class ConfigClass {
1212
this.widgets = this.file.config.widgets;
1313
}
1414

15-
public get_widgets() {
15+
public get_widgets_html() {
1616
let html_widgets: Array<DocumentFragment> = [];
17-
17+
18+
let i = 0;
1819
this.widgets.forEach(element => {
1920
const type = element.type;
2021

@@ -58,8 +59,8 @@ export class ConfigClass {
5859
}
5960
}
6061

61-
html_widgets.push(clone);
62-
62+
(clone.querySelector(".widget-switch-input") as HTMLInputElement).id = "input-widget-" + i.toString();
63+
html_widgets.push(clone); i += 1;
6364
});
6465

6566
// Return array of HTML elements

0 commit comments

Comments
 (0)