query toolstip

This commit is contained in:
Jan Prochazka
2022-02-12 20:53:55 +01:00
parent 74cf073bfa
commit 488b200fcb
5 changed files with 108 additions and 77 deletions

View File

@@ -26,18 +26,20 @@
const electron = getElectron();
export let quickExportHandlerRef;
export let quickExportHandlerRef = null;
export let command = 'sqlDataGrid.export';
export let label = 'Advanced settings';
function getExportMenu() {
return [
quickExportHandlerRef?.value ? createQuickExportMenuItems($extensions, quickExportHandlerRef?.value) : null,
{ divider: true },
{ command: 'sqlDataGrid.export', text: 'Advanced settings' },
{ command, text: label },
];
}
</script>
{#if electron}
{#if quickExportHandlerRef && electron}
<ToolStripDropDownButton menu={getExportMenu} label="Export" icon="icon export" />
{:else}
<ToolStripCommandButton command="sqlDataGrid.export" />