Fix import Export Server loading issue, affected due to SchemaView component changes.

This commit is contained in:
Khushboo Vashi 2024-08-12 11:27:21 +05:30 committed by GitHub
parent ccaea82341
commit fb0022923a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -62,8 +62,14 @@ export default function ImportExportServers({onClose}) {
const [summaryData, setSummaryData] = React.useState([]);
const [summaryText, setSummaryText] = React.useState('');
const [noteText, setNoteText] = React.useState('');
const [selectionSchemaInstance, setSelectionSchemaInstance] = React.useState();
const api = getApiInstance();
React.useEffect(() => {
const impExpSchema = new ImportExportSelectionSchema();
setSelectionSchemaInstance(impExpSchema);
}, []);
const onSave = () => {
let post_data = {'filename': selectionFormData.filename},
save_url = url_for('import_export_servers.save');
@ -211,11 +217,12 @@ export default function ImportExportServers({onClose}) {
beforeNext={onBeforeNext}
>
<WizardStep stepId={0}>
{selectionSchemaInstance &&
<SchemaView
formType={'dialog'}
getInitData={() => {/*This is intentional (SonarQube)*/}}
viewHelperProps={{ mode: 'create' }}
schema={new ImportExportSelectionSchema()}
schema={selectionSchemaInstance}
showFooter={false}
isTabView={false}
formClassName='ImportExportServers-Background'
@ -223,6 +230,7 @@ export default function ImportExportServers({onClose}) {
setSelectionFormData(changedData);
}}
/>
}
<FormFooterMessage type={MESSAGE_TYPE.ERROR} message={errMsg} onClose={onErrClose} />
</WizardStep>
<WizardStep stepId={1} className='ImportExportServers-noOverflow'>