Remove Tabs from ComponentRegisterer (#713)

Now that Tabs are being rendered via Tabs.tsx the knockout component names are not needed either.
This commit is contained in:
Jordi Bunster
2021-04-23 19:53:48 -07:00
committed by GitHub
parent 5323f6ca4b
commit b7c911d19a
28 changed files with 59 additions and 173 deletions

View File

@@ -103,11 +103,8 @@ function TabPane({ tab, active }: { tab: Tab; active: boolean }) {
ko.applyBindings(tab, element);
const ctx = ko.contextFor(element).createChildContext(tab);
ko.applyBindingsToDescendants(ctx, element);
return () => ko.cleanNode(element);
}
if ("render" in tab) {
tab.isTemplateReady(true);
return () => ko.cleanNode(element);
}
}, [ref, tab]);
@@ -115,5 +112,5 @@ function TabPane({ tab, active }: { tab: Tab; active: boolean }) {
return <div {...attrs}>{tab.render()}</div>;
}
return <div {...attrs} ref={ref} data-bind="html: constructor.component.template" />;
return <div {...attrs} ref={ref} data-bind="html:html" />;
}