fix: Properly fetch tables in source edit dropdown when new connection is selected (#1067)

This commit is contained in:
Mike Shi 2025-08-12 10:38:05 -07:00 committed by GitHub
parent c0b188c1c5
commit 9cd9bfb812
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---
fix: Properly fetch tables in source edit dropdown when new connection is selected

View file

@ -66,7 +66,7 @@ export function useTablesDirect(
) {
const clickhouseClient = getClickhouseClient();
return useQuery<ResponseJSON<ColumnMeta>, Error>({
queryKey: [`direct_datasources/databases/${database}/tables`],
queryKey: [`direct_datasources/databases/${database}/tables`, connectionId],
queryFn: async () => {
const paramSql = chSql`SHOW TABLES FROM ${{ Identifier: database }}`;
const json = await clickhouseClient