Remove hack for mounting JSON editor (#1565)

This commit is contained in:
Jon Koops 2021-11-17 12:45:29 +01:00 committed by GitHub
parent 15baa43cfb
commit d591e0d4a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,6 +60,7 @@ export const UserProfileTab = () => {
<Tabs <Tabs
activeKey={activeTab} activeKey={activeTab}
onSelect={(_, key) => setActiveTab(key.toString())} onSelect={(_, key) => setActiveTab(key.toString())}
mountOnEnter
> >
<Tab <Tab
eventKey="attributes" eventKey="attributes"
@ -73,17 +74,11 @@ export const UserProfileTab = () => {
eventKey="jsonEditor" eventKey="jsonEditor"
title={<TabTitleText>{t("jsonEditor")}</TabTitleText>} title={<TabTitleText>{t("jsonEditor")}</TabTitleText>}
> >
{/** The code editor needs to be rendered conditionally to prevent it from being initialized <JsonEditorTab
* while the tab contents are hidden. If the contents of the tab are hidden then it profiles={profiles}
* might not initialize correctly. onSave={onSave}
*/} isSaving={isSaving}
{activeTab === "jsonEditor" && ( />
<JsonEditorTab
profiles={profiles}
onSave={onSave}
isSaving={isSaving}
/>
)}
</Tab> </Tab>
</Tabs> </Tabs>
); );