diff --git a/apps/desktop/src/components/export/DatabaseExportDialog.vue b/apps/desktop/src/components/export/DatabaseExportDialog.vue index 5642bcceb..975871e15 100644 --- a/apps/desktop/src/components/export/DatabaseExportDialog.vue +++ b/apps/desktop/src/components/export/DatabaseExportDialog.vue @@ -14,7 +14,8 @@ import { generateDatabaseExportId } from "@/lib/databaseExport"; import { buildSelectedTablesPayload } from "@/lib/databaseExportSelection"; import { isTauriRuntime } from "@/lib/tauriRuntime"; import { useToast } from "@/composables/useToast"; -import { Download, Square, CheckSquare, X } from "lucide-vue-next"; +import { Input } from "@/components/ui/input"; +import { Download, Square, CheckSquare, Search, X } from "lucide-vue-next"; const { t } = useI18n(); const { toast } = useToast(); @@ -38,6 +39,12 @@ const loadingMeta = ref(false); const tables = ref([]); const selectedTables = ref([]); const loadingTables = ref(false); +const tableFilter = ref(""); +const filteredTables = computed(() => { + const q = tableFilter.value.trim().toLowerCase(); + if (!q) return tables.value; + return tables.value.filter((name) => name.toLowerCase().includes(q)); +}); const tableError = ref(null); // Options @@ -147,11 +154,14 @@ function toggleTable(table: string) { } function selectAllTables() { - selectedTables.value = [...tables.value]; + const selected = new Set(selectedTables.value); + for (const name of filteredTables.value) selected.add(name); + selectedTables.value = tables.value.filter((name) => selected.has(name)); } function clearSelectedTables() { - selectedTables.value = []; + const removing = new Set(filteredTables.value); + selectedTables.value = selectedTables.value.filter((name) => !removing.has(name)); } async function startExport() { @@ -386,6 +396,10 @@ watch( {{ t("databaseExport.tableLoadError", { error: tableError }) }}
+
+ + +