diff options
Diffstat (limited to '')
-rw-r--r-- | static/components/tab-group-element.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/static/components/tab-group-element.ts b/static/components/tab-group-element.ts index e90997e9..11949870 100644 --- a/static/components/tab-group-element.ts +++ b/static/components/tab-group-element.ts @@ -26,8 +26,8 @@ class TabGroupElement extends ComponentVEvent { tabs: HTMLElement[] = []; tabLabels: HTMLElement[] = []; - constructor(uid?: string) { - super(uid); + constructor(uid?: string, instance?: string) { + super(uid!, instance!); this.menu = makeElement('div', {}, { role: 'tablist', @@ -43,7 +43,8 @@ class TabGroupElement extends ComponentVEvent { if (!this.has_rrule_tab()) { /* Note that EditRRule register itself to be updated on changes to the event */ - this.addTab(new EditRRule(data.getProperty('uid')), + this.addTab(new EditRRule(data.getProperty('uid'), + data.getProperty('dtstart')?.format('~Y-~m-~dT~H:~M:~S')), "↺", "Upprepningar"); } } else { @@ -71,7 +72,7 @@ class TabGroupElement extends ComponentVEvent { } /* redraw might add or remove tabs depending on our data, so call it here */ - this.redraw(vcal_objects.get(this.uid)!); + this.redraw(this.getData()!); /* All tabs should now be ready, focus the first one */ if (this.tabLabels.length > 0) { @@ -144,7 +145,7 @@ class TabGroupElement extends ComponentVEvent { if (tab.firstChild) { let child = tab.firstChild as HTMLElement; if (isRedrawable(child)) { - vcal_objects.get(this.uid)?.unregister(child) + this.getData()?.unregister(child) } } |