export database popup menu

This commit is contained in:
Jan Prochazka 2020-06-18 16:53:03 +02:00
parent 07287e5f7f
commit 061921fd6c

View File

@ -36,10 +36,25 @@ function Menu({ data, setOpenedTabs, showModal }) {
));
};
const handleExport = () => {
showModal((modalState) => (
<ImportExportModal
modalState={modalState}
initialValues={{
targetStorageType: 'csv',
sourceStorageType: 'database',
sourceConnectionId: data.connection._id,
sourceDatabaseName: data.name,
}}
/>
));
};
return (
<>
<DropDownMenuItem onClick={handleNewQuery}>New query</DropDownMenuItem>
<DropDownMenuItem onClick={handleImport}>Import</DropDownMenuItem>
<DropDownMenuItem onClick={handleExport}>Export</DropDownMenuItem>
</>
);
}