UI: Fix a bug in ConfigurePage.js responsible for lacking re-render

key property makes the component unique and causes a re-construction. This solves a bug where different configuration page tabs remain with the same data on switch
This commit is contained in:
vakarisz 2022-07-04 12:19:16 +03:00
parent ab720a5a55
commit 26f51d1540
1 changed files with 8 additions and 11 deletions

View File

@ -353,17 +353,14 @@ class ConfigurePageComponent extends AuthComponent {
formProperties['formData'], formProperties['formData'],
formProperties['uiSchema']); formProperties['uiSchema']);
if (this.state.selectedSection === 'internal') { console.log(displayedSchema)
return (<InternalConfig {...formProperties}/>) return (
} else { <div>
return ( <Form {...formProperties} key={displayedSchema.title}>
<div> <button type='submit' className={'hidden'}>Submit</button>
<Form {...formProperties}> </Form>
<button type='submit' className={'hidden'}>Submit</button> </div>
</Form> )
</div>
)
}
}; };
setPbaFilenameWindows = (filename) => { setPbaFilenameWindows = (filename) => {