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['uiSchema']);
if (this.state.selectedSection === 'internal') {
return (<InternalConfig {...formProperties}/>)
} else {
return (
<div>
<Form {...formProperties}>
<button type='submit' className={'hidden'}>Submit</button>
</Form>
</div>
)
}
console.log(displayedSchema)
return (
<div>
<Form {...formProperties} key={displayedSchema.title}>
<button type='submit' className={'hidden'}>Submit</button>
</Form>
</div>
)
};
setPbaFilenameWindows = (filename) => {