mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 07:16:52 -06:00
Fix import Export Server loading issue, affected due to SchemaView component changes.
This commit is contained in:
parent
ccaea82341
commit
fb0022923a
@ -62,8 +62,14 @@ export default function ImportExportServers({onClose}) {
|
|||||||
const [summaryData, setSummaryData] = React.useState([]);
|
const [summaryData, setSummaryData] = React.useState([]);
|
||||||
const [summaryText, setSummaryText] = React.useState('');
|
const [summaryText, setSummaryText] = React.useState('');
|
||||||
const [noteText, setNoteText] = React.useState('');
|
const [noteText, setNoteText] = React.useState('');
|
||||||
|
const [selectionSchemaInstance, setSelectionSchemaInstance] = React.useState();
|
||||||
const api = getApiInstance();
|
const api = getApiInstance();
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
const impExpSchema = new ImportExportSelectionSchema();
|
||||||
|
setSelectionSchemaInstance(impExpSchema);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const onSave = () => {
|
const onSave = () => {
|
||||||
let post_data = {'filename': selectionFormData.filename},
|
let post_data = {'filename': selectionFormData.filename},
|
||||||
save_url = url_for('import_export_servers.save');
|
save_url = url_for('import_export_servers.save');
|
||||||
@ -211,18 +217,20 @@ export default function ImportExportServers({onClose}) {
|
|||||||
beforeNext={onBeforeNext}
|
beforeNext={onBeforeNext}
|
||||||
>
|
>
|
||||||
<WizardStep stepId={0}>
|
<WizardStep stepId={0}>
|
||||||
<SchemaView
|
{selectionSchemaInstance &&
|
||||||
formType={'dialog'}
|
<SchemaView
|
||||||
getInitData={() => {/*This is intentional (SonarQube)*/}}
|
formType={'dialog'}
|
||||||
viewHelperProps={{ mode: 'create' }}
|
getInitData={() => {/*This is intentional (SonarQube)*/}}
|
||||||
schema={new ImportExportSelectionSchema()}
|
viewHelperProps={{ mode: 'create' }}
|
||||||
showFooter={false}
|
schema={selectionSchemaInstance}
|
||||||
isTabView={false}
|
showFooter={false}
|
||||||
formClassName='ImportExportServers-Background'
|
isTabView={false}
|
||||||
onDataChange={(isChanged, changedData) => {
|
formClassName='ImportExportServers-Background'
|
||||||
setSelectionFormData(changedData);
|
onDataChange={(isChanged, changedData) => {
|
||||||
}}
|
setSelectionFormData(changedData);
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
<FormFooterMessage type={MESSAGE_TYPE.ERROR} message={errMsg} onClose={onErrClose} />
|
<FormFooterMessage type={MESSAGE_TYPE.ERROR} message={errMsg} onClose={onErrClose} />
|
||||||
</WizardStep>
|
</WizardStep>
|
||||||
<WizardStep stepId={1} className='ImportExportServers-noOverflow'>
|
<WizardStep stepId={1} className='ImportExportServers-noOverflow'>
|
||||||
|
Loading…
Reference in New Issue
Block a user