mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
export database popup menu
This commit is contained in:
parent
07287e5f7f
commit
061921fd6c
@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user