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。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
fix(grid): show exact total row count by default
zipg5186ecfa035f
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vueindex 567742a5e8..96316fa651 100644--- a/apps/desktop/src/components/grid/DataGrid.vue+++ b/apps/desktop/src/components/grid/DataGrid.vue@@ -310,8 +310,10 @@ interface DataGridProps {}const props = withDefaults(defineProps<DataGridProps>(), {- // Vue casts absent Boolean props to false unless the default is explicitly- // undefined; omitted row-action limits must keep normal table-data editing.+ // Vue casts absent Boolean props to false unless a default is explicit.+ // Regular grids have exact totals; document stores opt into lower-bound totals.+ totalRowCountIsExact: true,+ // Omitted row-action limits must keep normal table-data editing.allowInsertRows: undefined,allowDeleteRows: undefined,});diff --git a/apps/desktop/src/components/grid/__tests__/DataGridTotalRowCount.spec.ts b/apps/desktop/src/components/grid/__tests__/DataGridTotalRowCount.spec.tsnew file mode 100644index 0000000000..a0cdb42b3f--- /dev/null+++ b/apps/desktop/src/components/grid/__tests__/DataGridTotalRowCount.spec.ts@@ -0,0 +1,12 @@+import { describe, expect, it } from "vitest";+import DataGrid from "../DataGrid.vue";++type VuePropDefinition = { default?: unknown };+type VueComponentWithProps = { props?: Record<string, VuePropDefinition> };++describe("DataGrid total row count exactness", () => {+ it("treats totals as exact unless a caller explicitly marks them as a lower bound", () => {+ const component = DataGrid as unknown as VueComponentWithProps;+ expect(component.props?.totalRowCountIsExact?.default).toBe(true);+ });+});