diff --git a/web/src/features/admin/SourcesView.vue b/web/src/features/admin/SourcesView.vue index 9eba2d8..3ac5293 100644 --- a/web/src/features/admin/SourcesView.vue +++ b/web/src/features/admin/SourcesView.vue @@ -183,7 +183,10 @@ function lookup(tablename: string) { } function setPicked(names: string[]) { - chosen.value = names.map(lookup).filter((item): item is QueryTable => Boolean(item)); + const wasEmpty = chosen.value.length === 0; + const next = names.map(lookup).filter((item): item is QueryTable => Boolean(item)); + if (wasEmpty && next.length && !name.value.trim()) name.value = next[0].name; + chosen.value = next; } function removeTable(tablename: string) {