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: apply only visible checked values when local filter has active search

t8y2c37caeba78f1
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index fb7d141b2c..d8c45c82f1 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -5,6 +5,7 @@ mod models;
use commands::connection::AppState;
use dbx_core::storage::Storage;
use std::sync::Arc;
+use std::time::Instant;
use tauri::{Manager, RunEvent};
#[cfg_attr(mobile, tauri::mobile_entry_point)]
diff --git a/src/components/grid/DataGrid.vue b/src/components/grid/DataGrid.vue
index 1693e443d1..f14e45b449 100644
--- a/src/components/grid/DataGrid.vue
+++ b/src/components/grid/DataGrid.vue
@@ -391,10 +391,15 @@ function applyLocalFilter() {
if (!draft) return;
const allKeys = new Set(localFilterAllOptions.value.map((option) => option.key));
const next = { ...localColumnFilters.value };
- if (draft.values.size === 0 || draft.values.size === allKeys.size) {
+ let selected = draft.values;
+ if (localFilterSearch.value.trim()) {
+ const visibleKeys = new Set(localFilterOptions.value.map((o) => o.key));
+ selected = new Set([...draft.values].filter((k) => visibleKeys.has(k)));
+ }
+ if (selected.size === 0 || selected.size === allKeys.size) {
delete next[draft.columnIndex];
} else {
- next[draft.columnIndex] = new Set(draft.values);
+ next[draft.columnIndex] = new Set(selected);
}
localColumnFilters.value = next;
closeLocalFilter();