From cea1d1fa285c57c8e2648de8500af93c84d6406a Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 19 Jul 2022 18:57:00 +0200 Subject: [PATCH] UI: Add fix for propagation tabs change --- .../CredentialsConfig.tsx | 1 - .../PropagationConfig.tsx | 23 ++++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/CredentialsConfig.tsx b/monkey/monkey_island/cc/ui/src/components/configuration-components/CredentialsConfig.tsx index dbe9e4e91..4e40f980b 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/CredentialsConfig.tsx +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/CredentialsConfig.tsx @@ -13,7 +13,6 @@ export default function CredentialsConfig(props) { } = props; let credentialsCopy = _.clone(credentials); - return (<>
{ - setLocalFormData(configuration[selectedSection]); - setDisplayedSchema(getSchemaByKey(schema, selectedSection)); - setDisplayedSchemaUi(getUiSchemaByKey(uiSchema, selectedSection)); - }, [selectedSection]) const onFormDataChange = (formData) => { let formDataClone = _.clone(formData.formData); @@ -63,23 +55,28 @@ export default function PropagationConfig(props) { } const getForm = () => { + let selectedSectionData = configuration[selectedSection]; + let displayedSchema = getSchemaByKey(schema, selectedSection); + let displayedUiSchema = getUiSchemaByKey(uiSchema, selectedSection); if (selectedSection === 'credentials') { return } else { - return + return formForm; } }