diff --git a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx index 936fceb20..f4d9aa167 100644 --- a/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx +++ b/web/pgadmin/tools/import_export_servers/static/js/ImportExportServers.jsx @@ -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,18 +217,20 @@ export default function ImportExportServers({onClose}) { beforeNext={onBeforeNext} > - {/*This is intentional (SonarQube)*/}} - viewHelperProps={{ mode: 'create' }} - schema={new ImportExportSelectionSchema()} - showFooter={false} - isTabView={false} - formClassName='ImportExportServers-Background' - onDataChange={(isChanged, changedData) => { - setSelectionFormData(changedData); - }} - /> + {selectionSchemaInstance && + {/*This is intentional (SonarQube)*/}} + viewHelperProps={{ mode: 'create' }} + schema={selectionSchemaInstance} + showFooter={false} + isTabView={false} + formClassName='ImportExportServers-Background' + onDataChange={(isChanged, changedData) => { + setSelectionFormData(changedData); + }} + /> + }