fix(grid): hide table actions before data loads

This commit is contained in:
t8y2 committed 2026-07-11 09:29:25 +08:00
1 parent 8506c9c373
commit eecc2473d9
1 file changed
+4 -2
@@ -1401,8 +1401,10 @@ defineExpose({ focusSearch, refreshData, handleModRTarget, requestQueryEditorExe
</div> </div>
</PopoverContent> </PopoverContent>
</Popover> </Popover>
<Button v-if="activeTab.tableMeta && activeTab.connectionId" variant="ghost" size="sm" class="h-5 text-xs px-1.5 shrink-0" :class="{ 'bg-accent': dataGridRef?.showDdl }" @click="dataGridRef?.toggleDdl()"><TableProperties class="h-3.5 w-3.5" />{{ t("grid.tableInfo") }}</Button> <Button v-if="activeTab.result && activeTab.tableMeta && activeTab.connectionId" variant="ghost" size="sm" class="h-5 text-xs px-1.5 shrink-0" :class="{ 'bg-accent': dataGridRef?.showDdl }" @click="dataGridRef?.toggleDdl()"
<DropdownMenu v-if="activeTab.tableMeta && activeTab.connectionId"> ><TableProperties class="h-3.5 w-3.5" />{{ t("grid.tableInfo") }}</Button
>
<DropdownMenu v-if="activeTab.result && activeTab.tableMeta && activeTab.connectionId">
<DropdownMenuTrigger as-child> <DropdownMenuTrigger as-child>
<Button variant="ghost" size="sm" class="h-5 text-xs px-1.5 shrink-0" :title="t('tableToolbox.title')"><Toolbox class="h-3.5 w-3.5" />{{ t("tableToolbox.title") }}</Button> <Button variant="ghost" size="sm" class="h-5 text-xs px-1.5 shrink-0" :title="t('tableToolbox.title')"><Toolbox class="h-3.5 w-3.5" />{{ t("tableToolbox.title") }}</Button>
</DropdownMenuTrigger> </DropdownMenuTrigger>