connection modal converted

This commit is contained in:
Jan Prochazka
2021-03-04 17:55:45 +01:00
parent ce44e271ae
commit c2dc4d76ba
13 changed files with 284 additions and 25 deletions

View File

@@ -4,7 +4,7 @@
if (tabComponent) {
return {
tabComponent,
props: selectedTab.props,
props: selectedTab && selectedTab.props,
};
}
return null;
@@ -38,11 +38,15 @@
$: {
if (selectedTab) {
const { tabid } = selectedTab;
if (tabid && !mountedTabs[tabid])
mountedTabs = {
...mountedTabs,
[tabid]: createTabComponent(selectedTab),
};
if (tabid && !mountedTabs[tabid]) {
const newTab = createTabComponent(selectedTab);
if (newTab) {
mountedTabs = {
...mountedTabs,
[tabid]: newTab,
};
}
}
}
}
</script>