Remove hack for mounting JSON editor (#1565)
This commit is contained in:
parent
15baa43cfb
commit
d591e0d4a4
1 changed files with 6 additions and 11 deletions
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue