Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(grid): prevent toolbar overlap

t8y22150443bdaea
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue
index f72241e2d4..81ff50b459 100644
--- a/apps/desktop/src/components/grid/DataGrid.vue
+++ b/apps/desktop/src/components/grid/DataGrid.vue
@@ -2969,7 +2969,7 @@ defineExpose({
<ContextMenuTrigger as-child>
<div v-if="hasData || canUseWhereSearch" class="flex-1 flex flex-col overflow-hidden">
<!-- Search bar -->
- <div class="flex items-stretch border-b shrink-0 bg-muted/20 relative">
+ <div class="data-grid-topbar flex items-stretch border-b shrink-0 bg-muted/20 relative">
<div
v-if="useTransaction && editable && (tableMeta || customSave)"
class="flex items-center px-2 py-0.5 border-r shrink-0"
@@ -4677,6 +4677,10 @@ defineExpose({
</template>
<style scoped>
+.data-grid-topbar {
+ min-width: 760px;
+}
+
.data-grid-scroller {
overflow-anchor: none;
will-change: scroll-position;
diff --git a/packages/app-tests/dataGridToolbarLayout.test.ts b/packages/app-tests/dataGridToolbarLayout.test.ts
new file mode 100644
index 0000000000..3246f765f7
--- /dev/null
+++ b/packages/app-tests/dataGridToolbarLayout.test.ts
@@ -0,0 +1,10 @@
+import { readFileSync } from "node:fs";
+import { strict as assert } from "node:assert";
+import test from "node:test";
+
+const source = readFileSync("apps/desktop/src/components/grid/DataGrid.vue", "utf8");
+
+test("data grid toolbar keeps a minimum content width", () => {
+ assert.match(source, /class="data-grid-topbar flex items-stretch/);
+ assert.match(source, /\.data-grid-topbar\s*\{\s*min-width: 760px;/s);
+});